tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hemant Singh" <hemant11...@yahoo.com>
Subject Re: /lib & /WEB-INF/lib
Date Thu, 10 Feb 2000 14:27:09 GMT
HI:
If you have a jar which you are using in more than  one web-apps than place
it under
/tomat/lib
so that tomcat do not reload the same jar more than once(I really surprise
how internally it works)

and if you are using that jar only in one web-app than place than place it
under
/tomcat/webappps/yourwebapp/web-inf/lib

Regards
Hemant
----- Original Message -----
From: "Bo Xu" <bo@cybershop.ca>
To: <tomcat-user@jakarta.apache.org>
Sent: Friday, June 08, 2001 7:02 PM
Subject: Re: /lib & /WEB-INF/lib


> 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?
> >
> > thanks.
> > [...]
>
> Hi :-)
>
> - the jar files in TOMCAT_HOME/sebapps/myapp/WEB-INFlib
>   are loaded by the classloader of this webapp(myapp), normally they
>   are only used in this webapp(myapp).
>
> - the jar files in TOMCAT_HOME/lib are loaded by another classloader
>    (SharedClassloader) which is "upper" than the classloader of this
> webapp
>    or that webapp in "JAVA2 delegation model", these jar files are
> "shared"
>    for all webapp(0) or webapp(1) or webapp(2)...
>       % If you want to share a utility class to all webapp, you can wrap
>
>            it into a jar file, and put the jar file here.
>       % because sometimes the classloader of one special webapp(for
> example,
>            myapp) will be destroyed(for example, auto-reloading), so If
> you don't
>            want a utility class to be load/reload several times, you can
> wrap
>            it into a jar file, and put the jar file here.
>
>
> Bo
> June.08, 2001
>


Mime
View raw message