Sure, in common/lib it works well. But from Tomcat docs:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html

The following rules cover about 95% of the decisions that application
developers and deployers must make about where to place class and
resource files to make them available to web applications:

        * For classes and resources specific to a particular web
application, place unpacked classes and resources under /WEB-INF/classes
of your web application archive, or place JAR files containing those
classes and resources under /WEB-INF/lib of your web application
archive.
        * For classes and resources that must be shared across all web
applications, place unpacked classes and resources under
$CATALINA_BASE/shared/classes, or place JAR files containing those
classes and resources under $CATALINA_BASE/shared/lib.

--Then goes on...---

Common - This class loader contains additional classes that are made
visible to both Tomcat internal classes and to all web applications.
Normally, application classes should NOT  be placed here. All unpacked
classes and resources in $CATALINA_HOME/common/classes, as well as
classes and resources in JAR files under the
$CATALINA_HOME/commons/endorsed and $CATALINA_HOME/common/lib
directories, are made visible through this class loader.

Shared - This class loader is the place to put classes and resources
that you wish to share across ALL  web applications (unless Tomcat
internal classes also need access, in which case you should put them in
the Common  class loader instead). All unpacked classes and resources in
$CATALINA_BASE/shared/classes, as well as classes and resources in JAR
files under $CATALINA_BASE/shared/lib, are made visible through this
class loader.

----

In our case we want to share jars common to all applications, but none
of them are required by Tomcat.

Ivan.

-----Original Message-----
From: Erik Weber [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 31, 2004 12:52 PM
To: Struts Users Mailing List
Subject: Re: Classloading problem

I have been using 5.0.27, putting my JDBC drivers in common/lib, and my 
struts jars in WEB-INF/lib of each application, and haven't had any 
problems. Why do you say "incorrectly"?

Erik


Ivan Vasquez wrote:

>We have Tomcat 5.0.16 and were incorrectly placing common jars (such as
>JDBC drivers) in /common/lib. 
>
>Now we just moved them to /shared/lib (for truly common stuff) and
>WEB-INF/lib, but now all applications complain giving a
>java.lang.ClassNotFoundException, just like if things weren't in
>Tomcat's classpath anymore. Apps and Tomcat restarts have been done
>several times.
>
>Is there anything in web.xml, server.xml, etc that needs to be set?
What
>are we possibly missing? Tomcat docs are pretty straightforward about
it
>and everything seems right.
>
>Once again, thanks in advance.
>Ivan.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to