tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Milt Epstein <>
Subject Re: /lib & /WEB-INF/lib
Date Thu, 07 Jun 2001 23:31:08 GMT
On Thu, 7 Jun 2001, eric ng wrote:

> Hi,
> In tomcat or other servlet engine implements the spec.
>  there are 2 place to put JAR files:
> 1) d:/tomcat/lib
> 2) d:/tomcat/webapps/abc/WEB-INF/lib
> I wonder what's the difference putting JAR in the 2
> directory? any performance difference? Should I always
> put JAR into web apps's own lib?

The main difference is a functional/modular one: Things in 1) will be
seen by all webapps/contexts, things in 2) will be seen only by the
one webapp/context.  In certain situations (e.g. you only have one
webapp/context), there'd be no difference.  There might be performance
differences, I don't know, but I suspect they'd be minor.

So things that need to be seen by all webapps/contexts need to be in
1).  Things that only need to be seen by one webapp/context could
conceivably go in either 1) or 2).  As a matter of clean design, I'd
suggest these latter things go in 2).

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)

View raw message