tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <>
Subject Re: Setting classpath out of the webapp directory
Date Mon, 03 May 2004 12:02:56 GMT
Place your classes in common/lib or shared/lib

But you need to be careful. The common/lib and shared/lib classloaders cannot 
see the WEB-INF classloader - which means that you can easily get the no 
class found errors.

Multiple copies of JAR files in each classloader is OK. You can do that via 
symlinks or better - make the copy of the libraries (or classes) as part of 
you ant build script. If its part of your ant build script - there is not 
extra work to do.


Honza Spurný wrote:
> Hi there,
> I'have been trying to set the classpath of the webapp out of the directory
> of this webapp. This is for me little important, since some classes I'd like
> to use (I have to use) in other webapps. I want to have only one file of
> this class -- I don't want to copy classes between the webapps.
> I'm sure it is possible to do it, as I need it, but I don't know how. Would
> be anybody so kind and help me with this?
> I would also like to "export" the lib directory of webapp out of the webapp
> directory so that the shared libaries could be presented as file only once.
> This is probably the same problem as above.
> Could anybody help me? Thanks a lot.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message