u can set your classpath in project --> setting --> servlet jsp --> expert tab  . First make sure u r tomcat is running or not
----- Original Message -----
Sent: Monday, September 24, 2001 5:53 PM
Subject: Re: possible idiot question

thanks for you reply...
 
i feel i may be getting somewhere now that someone has pointed out the things that are right..
 
 
my classes are stored in the webapps folder of tomcat under the directory...
 
webapps\begjsp-ch07\WEB-INF\classes\com\wrox\library\            does this tally with my package declaration?
 
i am unclear as to where the classpath is defined, and what it should contain... (any suggestions?) there will be many more classes within this pakage by the time i have finished this section of the tut.
 
thanks again shivaraj
 
 
cheers
 
ewan
-----Original Message-----
From: shivaraj [mailto:[EMAIL PROTECTED]]
Sent: 24 September 2001 12:49
To: [EMAIL PROTECTED]
Subject: Re: possible idiot question

1) Where r u stroing your classes? If u r classes are in com.wrox.library then what r u doing right. But i think u have to check u r classpath and have it pointing to directory which is containing com package.
2) If u just want to use that package, just import that package instead of declaring a package. and com.wrox.library should be in u r classpath.
 
happy coding
 
----- Original Message -----
Sent: Monday, September 24, 2001 4:48 PM
Subject: Re: possible idiot question

thanks very much for you reply, but i think that is what i have done with the declaration...
 
package com.wrox.library;
 
in both of the classes, as i understand it a package is euphanism for directory, would that be correct.
 
as you will gather this is a wrox tut
 
i have pasted the code below for anyone who is interested:
 
initial class:
*******************************************************
package com.wrox.library;
 
public class Book {
 
    private String title;
   
    public String getTitle() {
        return title;
    }
   
    public void setTitle (String title) {
        this.title = title;
    }
   
    /** Creates new Book: Constructor */
    public Book () {
    }
   
    public Book (String title) {
    this.title = title;
    }
 
}
 
*******************************************************
 
 
extension class:
*******************************************************
package com.wrox.library;
 
public class ChildrensBook extends Book {
 
    private int minimumAge;
   
    public int getMinimumAge() {
        return minimumAge;
    }
   
    public void setMinimumAge(int a) {
        minimumAge = a;
    }
   
    public ChildrensBook() {
        super();
    }
   
    public ChildrensBook(String title) {
        super(title);
    }
}
 
*******************************************************
 
once again thanks to anyone who is willing to assist me...
 
 
 
ewan taylor
-----Original Message-----
From: shivaraj [mailto:[EMAIL PROTECTED]]
Sent: 24 September 2001 12:21
To: [EMAIL PROTECTED]
Subject: Re: possible idiot question

In both classes u have to declare the package to which that class belong. That may solve u r problem.
happy coding
----- Original Message -----
Sent: Monday, September 24, 2001 4:27 PM
Subject: possible idiot question

i am trying to get my head around class inheritance and have followed some tuts, however....
 
 
having created a simple class, and then creating a subclass, extending the first, i keep getting
 
    Class Book not found in type declaration or import...
 
 
when i try to compile it, they are both sitting in the same package.... pls help!! this is giving me a headache.
 
 
i am currently running Sun's Forte IDE with JDK1.3.1 and serving it up with Tomcat 4.0
 
forte suggests that i have an invalid package declaration but i can find no documentation on how to rectify this, and am baffled as i have followed the tuts to the letter and nothing seems out of kilter.
 
 
any help will be gratefully recieved...
 
cheers..
 
 
ewan taylor
========================= To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=P http://www.jguru.com/jguru/faq/faqpage.jsp?name=rvlets
========================= To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=P http://www.jguru.com/jguru/faq/faqpage.jsp?name=rvlets
========================= To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=P http://www.jguru.com/jguru/faq/faqpage.jsp?name=rvlets

Reply via email to