You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Will England <wi...@mylanders.com> on 2001/07/20 16:31:49 UTC

RE: [3.2] JSP Compiling Classpath issues -- finding WEB-INF/class es

On Fri, 20 Jul 2001, Andrew McGhee wrote:

> Guys,
> I've copied in an email returned to a support desk regarding a problem
> similar to this. There is a link to mikal.org that explains it in better
> detail, but essentially it refers to where your classes are found, as to
> what classloader they inherit. And the solution we found (similar to the
> post) is to ensure your classpath is unset before starting Tomcat.
> 

The solution posted (unset your classpath, cause there might be a class
with the same name somewhere else) is fine for first year university
students.  Most likely, that *is* what causes their problems.  <grin>

But, I have set, unset, hard coded, soft coded and so on the classpath.

In tomcat.sh, I have a hard-coded classpath pointing to the .jar files in
TOMCAT_HOME/lib, and tools.jar.  Nothing else.  I try to hit a JSP for the
first time, the compile fails.  Jasper reports that it cannot find classes
that are located in the web applications WEB-INF/classes
directory.  Theoretically, the adaptive classloader should know about
WEB-INF/classes, and I thought Jaspter used the adaptive classloader.

If I change the hard-coded classpath in tomcat.sh to point to the web
applications WEB-INF/classes directory, so that the WEB-INF/classes folder
is in the system classpath, Jasper can now find the classes and
compilation continues normally.

Can one of the developers detail out where Jasper looks for classes for
compiling JSPs?

Thanks for any tips or suggestions!

Will