tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Holscher, David M" <>
Subject RE: Moving /WEB-INF/lib or adding to it in TC 4.0
Date Tue, 07 Aug 2001 00:58:30 GMT

I agree totally and wouldn't ship a web app that relies on anything outside
the war file. I also understand that Tomcat has a lib directory to place
stuff that you want all applications to see. Neither of these things help
me. First of all, I have libraries that I don't want other apps to see so
the lib directory is a bad place (it's probably a bad idea to have anything
in the lib directory anyhow). Perhaps, I should pose my question another
way. Is there any way I can add jar files at a fixed location to a single
web app running under Tomcat? 

Really at issue, is that I can do it with JRun which I would really like to
replace with Tomcat 4.0 when it comes out of beta.

David Holscher 

-----Original Message-----
From: Craig R. McClanahan [] 
Sent: Monday, August 06, 2001 7:11 PM
To: ''
Subject: Re: Moving /WEB-INF/lib or adding to it in TC 4.0

On Mon, 6 Aug 2001, Holscher, David M wrote:

> I've waded through a lot of source now and can't figure out how point the
> /WEB-INF/lib directory for my web application somewhere else or at least
> another directory for jar files. This is a useful thing in my current
> development environment where I need jar files in two places. Changing
> the /WEB-INF/lib directory is avoids synchronization issues.

The way that the WEB-INF/lib directory works (and where it is relative to
the document root) is required by the servlet specification, and cannot be
changed.  It's a key requirement for self-contained web applications that
are portable across containers.

Most servlet containers provide a mechanism to support additional JAR
files that are visible to web apps.  For Tomcat 4, that mechanism is the
$CATALINA_HOME/lib directory -- all JAR files placed here are
automatically made visible to all web applications.

> David Holscher 

Craig McClanahan

View raw message