You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Alan Chaney <al...@compulsivecreative.com> on 2008/03/26 21:09:31 UTC

Tomcat 6 and placing jars in $CATALINA_HOME/lib

We are using tomcat 6.0.16 with a jdk 1.6. I have a number of web 
applications which use, for example, spring and hibernate. Is there any 
reason why these jars (and their dependencies) should not be placed in
$CATALINA_HOME/lib? It would save a lot of time uploading new releases 
of my own applications to my servers.

 From my reading of the docs there could be a potential problem if there 
is a conflict between existing classes in the TC distribution and the 
jars I would put in the 'lib'. What's the recommended practice?

Thanks in advance.

Regards

Alan Chaney


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat 6 and placing jars in $CATALINA_HOME/lib

Posted by Alan Chaney <al...@compulsivecreative.com>.
You're right. I debated whether or not there was an argument that I 
should always use the same jars for each project so it didn't matter, 
but then I decided that there was bound to be some case where that 
wouldn't work for some unforeseen reason. Its best to keep each webapp 
independent. There are other solutions to the time of uploads.

Thanks


Caldarale, Charles R wrote:
>> From: Alan Chaney [mailto:alan@compulsivecreative.com] 
>> Subject: Tomcat 6 and placing jars in $CATALINA_HOME/lib
>>
>> Is there any reason why these jars (and their dependencies) 
>> should not be placed in $CATALINA_HOME/lib?
> 
> The primary reason not to lump everything in one basket is webapp
> independence, which the servlet spec encourages.  If you do put commonly
> used jars in the lib directory, you're tying all your webapps to one
> instance of those particular classes.  This can create problems with
> versioning, should some of your apps migrate to newer levels of the
> common libraries, and with reloading webapps, since those libraries may
> retain references somewhere to objects of the webapp.
> 
> Given the price of disk and memory these days, along with automated
> scripts to build your .war files, the only thing you'd really save on is
> time to transfer an updated webapp.  Is that really a dominant factor,
> given the drawbacks?
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 
> !DSPAM:47eab1f3292727785049143!
> 

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Tomcat 6 and placing jars in $CATALINA_HOME/lib

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Alan Chaney [mailto:alan@compulsivecreative.com] 
> Subject: Tomcat 6 and placing jars in $CATALINA_HOME/lib
> 
> Is there any reason why these jars (and their dependencies) 
> should not be placed in $CATALINA_HOME/lib?

The primary reason not to lump everything in one basket is webapp
independence, which the servlet spec encourages.  If you do put commonly
used jars in the lib directory, you're tying all your webapps to one
instance of those particular classes.  This can create problems with
versioning, should some of your apps migrate to newer levels of the
common libraries, and with reloading webapps, since those libraries may
retain references somewhere to objects of the webapp.

Given the price of disk and memory these days, along with automated
scripts to build your .war files, the only thing you'd really save on is
time to transfer an updated webapp.  Is that really a dominant factor,
given the drawbacks?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org