Why can my webapp find classes in the WEB-INF/classes directory?
Location: http://www.jguru.com/faq/view.jsp?EID=500007 Created: Sep 19, 2001 Author: Alex Chaffee (http://www.jguru.com/guru/viewbio.jsp?EID=3) Question originally posed by Mark Gargan (http://www.jguru.com/guru/viewbio.jsp?EID=487167 First, you are right, Tomcat (or any servlet engine) should add classes in WEB-INF/classes to the web application’s classpath. It should do the same with JAR files in the WEB-INF/lib directory. Some suggest putting the extra classes in the TOMCAT_HOME/classes directory, but that is the wrong approach. You don’t want to pollute the CLASSPATH space of other webapps. It may appear to work, but for security and architectural reasons, only official Tomcat classes should go into TOMCAT_HOME/classes. To track down your problem, make double-extra sure that Tomcat has restarted, and that the class file is valid (i.e. it looks right “on the inside” as well as the outside — it’s been compiled with the correct package statement and so forth). You can also verify tha