> -----Original Message-----
> From: Brett G. Palmer [mailto:[EMAIL PROTECTED]]
>
> We are having random problems with some of our application
> libraries when we
> deploy them in their separate contexts.  The question I have
> is what is the
> default behavior for Tomcat to load class libraries into its
> CLASSPATH.  Do
> libraries from the $TOMCAT_HOME/lib directory get added to
> the CLASSPATH
> before libraries for a particular web application (e.g.
> webapps/someapp/WEB-INF/lib/*) or viceversa.
>
I believe that the order is:
"system classes" including installed extensions.
.zips/.jars in $TOMCAT_HOME/lib
WEB-INF/classes
WEB-INF/lib/*.jar

> I have also seen problems where my web application can't find
> a particular
> library when it is added to the "webapps/someapp/WEB-INF/lib"
>  but it can
> find it when it is added to the $TOMCAT_HOME/lib directory.
> This particular
> problem occurred when I tried to use Oracle's jdbc drivers (i.e.
> classes12.zip).  I would get class not found errors when the
> classes12.zip
> file was located in the WEB-INF/lib directory, but the errors
> went away when
> I used the $TOMCAT_HOME/lib directory.
>
if they were still named *.zip, the classloader ignores them. We just have
Ant rename them to *.jar before deploying to webapps/<ourapp>/WEB-INF/lib,
and they work fine.

> What is the recommended place for putting class libraries in
> the classpath
> for Tomcat?  Any suggestions would be greatly appreciated.

If there is any chance that the Tomcat installation will be hosting more
than one webapp, I strongly suggest that you put the libraries for each
webapp in its own WEB-INF/lib. Clashing jars do not make pretty sounds.

>
> Thanks in advance,
>
>
> Brett
>
>


George McKinney, Developer
Tantalus Communications Inc.
500-1122 Mainland Street
Vancouver, BC, Canada V6B 5L1
[EMAIL PROTECTED]

Direct  604.726.6753
Main    604.609.0700
Fax     604.609.0705

"The Oracle Experts"
www.tantalus.com


Reply via email to