The standard, when you are using a class that was not written by you and was delivered to you in a jar file (such as the org.apache classes), is to keep them jarred and place them in the WEB-INF/lib directory.  All classes written by you, for your project should be kept in the proper package directory structure under the WEB-INF/classes directory.
    (*Chris*)
----- Original Message -----
From: Chen, Gin
Sent: Wednesday, January 16, 2002 9:24 AM
Subject: Re: [JSP-INTEREST] JSP Beans

This is kind of a funny issue. If you do not have a package for a particular class, you have to add the class file to the lib directory of WEB-INF (create one if you dont have one). If it does have a package, then it is safe to put into the classes directory. You do not have to jar it up first.
IMHO, You should follow standards and put all classes into a logical package.
-Tim
-----Original Message-----
From: Chris Pratt [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 16, 2002 12:22 PM
To: [EMAIL PROTECTED]
Subject: Re: JSP Beans

Make sure that the jar file containing the org.apache.jsp.printCalendar is either on the CLASSPATH of the Servlet Container, or in your WEB-INF/lib directory.
    (*Chris*)
----- Original Message -----
From: Purav
Sent: Wednesday, January 16, 2002 1:09 AM
Subject: [JSP-INTEREST] JSP Beans

Hello ,

 

I am using Tomcat 4 and I have placed all my bean classes in the web-inf/classes directory.

However when I use them in my JSP as beans , the following error is thrown

 
D:\Tomcat\work\localhost\pim\calendar$jsp.java:464: Class org.apache.jsp.printCalendar not found.
 
If I place the printCalendar in a package, and then use it , it works..
Why such a behaviour. I guess the classes directory is implicitly included in the classpath at startup
 
Please help
Purav

                

Reply via email to