tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Rees <>
Subject Re: [DOC] Re: [3.2] JSP Compiling Classpath issues -- finding WEB-INF/class es
Date Sat, 21 Jul 2001 03:15:11 GMT
On Fri, Jul 20, 2001 at 12:47:51PM -0500, David Haraburda wrote:
> I don't think unsetting your CLASSPATH is necessary, especially since other
> applications may rely on it.  I would guess that most problems occur when:
> 1) You add things you have in your WEB-INF/classes to your CLASSPATH (thus causing them
> to be loaded by the system class loader, not the Tomcat web app class loader, which
> causes problems)
> or, as the case would appear to be with the POET sdk referred to before,
> 2) Your web application requires a certain JAR that you have placed in your WEB-INF/lib
> directory, but unbeknownst to you, there is actually another JAR (perhaps an older
> version of the software) sitting in your classpath, which gets loaded first.
> Remember, a classloader always asks it's parent classloader to load a resource first,
> and then only loads it itself if the parent cannot find it.
> Just make sure things your web application requires are in your WEB-INF/libs directory,
> and not in your classpath.
> Craig McClanahan has two good posts about this:

Thanks for the tips, what you've described is the exact behavior I've experienced.  
I just haven't had the time to read up about classloaders and the order which 
classes are loaded.

> As far as logging goes, you may want to check out the <Logger> elements is your
> server.xml file. They provide a good way to keep your terminal un-cluttered. :-)

Crap, I never really noticed this one before:

    <Logger name="tc_log"
            verbosityLevel = "INFORMATION"

Is there any other tricks I've been missing for a while with Tomcat?

(I know, getting off-topic for tomcat-dev)


View raw message