Can I place my classes somewhere other than inside WEB-INF?

Alessandro A. Garbagnati

Sun's specifications for Servlet define only the WEB-INF/classes and WEB-INF/lib directories in order to make the web application portable.

If you are not interested in portability, you can still put all your classes into the CLASSPATH environment variable.

The startup script for Tomcat 3.2.x should automatically add that classpath to the one used by Tomcat, while, with version 4.0.x and 3.3.x, you definitely need to make a small change in the startup script to add the CLASSPATH environment to the one that is generated by the script to esecute Tomcat.

The only issue is that the classes/jars you've added will be available to all the web applications running under that instance.

[Also, they may conflict with other library JARs. XML parsers are notorious for this problem. -Alex C]