Forums Register Login

Must classes be packaged?

+Pie Number of slices to send: Send
Is it true that I "have to" put my classes into packages for tomcat to find them?

I know it is a good aproach but... I am interested in knowing how Tomcat resolve the claaspath in JSPs since the compilated class is kept in a location other that myapp/WB-INF/classes


Thanks,


[Bear edit: added meaningful topic title]
[ April 28, 2005: Message edited by: Bear Bibeault ]
+Pie Number of slices to send: Send
Yes it is true.

And please use meaningful subjects for your topics. Thanks.
+Pie Number of slices to send: Send
 

compilated class is kept in a location other that myapp/WB-INF/classes



There are only certain locations that Tomcat will use to load classes. WEB-INF/classes (not WB-INF) is one of them. Another is any jar files in WEB-INF/lib. Tomcat also has some locations where jars can be shared among all web apps it is serving.

Your compiled classes must be placed according to these rules. Tomcat will not look at classes elsewhere, not even on any CLASSPATH environment variables.
See where your hand is? Not there. It's next to this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 555 times.
Similar Threads
where to place servlet class file
Why can't I invoke a ejb in Tomcat?
Log4j only reads log4j.properties in $CATALINA_HOME/lib
setting java_home in catalina.bat file
Help! adding a webapplication to tomcat 4
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 00:51:04.