Re: Cannot resolve Symbol (class) but why? (JSP)

Discussion in 'Java' started by @lex-kid, Jul 3, 2003.

  1. @lex-kid

    @lex-kid Guest

    Hey people.

    thanks for replying. Sorry didnt see that there was a reply allready.
    Maybe i looked in the other forum.

    I dont know if i understood it right but acording to you Chris i have
    to make the method static and then call it with Person.methodname() ?

    Unfortunatelly i havnt my Notebook here because the JDK and the
    sorcefiles are on it.
    But maybe next week i have it back. So i can try it.

    Sorry thought there are enough infos to understand the problem. Should
    i post some more?
    Just tell me and i will!

    so bye
    alex
     
    @lex-kid, Jul 3, 2003
    #1
    1. Advertising

  2. @lex-kid

    Chris Smith Guest

    [Again, I'm removing comp.lang.java from the distribution. That group
    has been obsolete since 1996, and crossposting to it could prevent
    people from seeing your question.]

    @lex-kid wrote:
    > I dont know if i understood it right but acording to you Chris i have
    > to make the method static and then call it with Person.methodname() ?


    There were a couple issues. That was one of them.

    > Sorry thought there are enough infos to understand the problem. Should
    > i post some more?


    You should always post all the information you have, instead of only
    posting a little bit and then asking if you should post more. Why on
    earth would you NOT post information that might be helpful, if you have
    it?

    > Just tell me and i will!


    Okay, I'm telling you. So do it.

    --
    www.designacourse.com
    The Easiest Way to Train Anyone... Anywhere.

    Chris Smith - Lead Software Developer/Technical Trainer
    MindIQ Corporation
     
    Chris Smith, Jul 3, 2003
    #2
    1. Advertising

  3. @lex-kid

    @lex-kid Guest

    Hey thanks for you help.
    I studied your thread again and now it seems to be working.

    I first made the methods static and also the variables.
    But why do they have to be static. Isnt it a class method or class
    variables then?
    Then i called the method in the JSP File with
    Person.ladeDBTreiber();

    Later on I made a package using package Person;
    in the Person.java File and compiled it. That worked fine.
    So I later called the package using
    <%@ page import = "Person.*" %>
    in the JSP File.
    What I then had to do is to place the Person.class into the right
    place. Mmm think the classpath is wrong could that be?
    I use Tomcat and have a directory called C:\\Programme\Apache
    Group\Tomcat 4.1\webapps\jspdb\WEB-INF\classes\
    There should all classes placed to I think.
    Inside the jspdb Folder there are also all other files (.jsp, .java
    and the Access Database)
    Now I made a subfolder inside the classes directory calles Person and
    placed the Person.class inside it.
    Before my app placed into jspdb folder. I use Kawa Pro btw.

    OK now I am trying a bit around and hope all works fine now!
    You helped me a lot. Also when I was a litle bit stupid on the
    newsgroup haha.
    Thanks a lot!

    bye
     
    @lex-kid, Jul 7, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sufia
    Replies:
    1
    Views:
    3,039
    @lex-kid
    Jul 6, 2003
  2. Jo

    Cannot resolve symbol

    Jo, Apr 9, 2004, in forum: Java
    Replies:
    3
    Views:
    2,724
    Roedy Green
    Apr 10, 2004
  3. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,990
    Smokey Grindel
    Dec 2, 2006
  4. Replies:
    1
    Views:
    10,170
  5. Replies:
    1
    Views:
    542
    RedGrittyBrick
    Jun 27, 2008
Loading...

Share This Page