You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by George McKInney <ge...@tantalus.com> on 2000/12/06 17:52:42 UTC
Your thoughts on organizing multiple web apps
We've got a heterogeneous collection of internal applications running under
the same Tomcat installation, and have recently had some problems.
This collection has "evolved" and changed as we learn more about using
Tomcat, and the problem seems to be that some webapps (particularly the
earlier ones) were installed with the .jar files they needed being put into
<TOMCAT_HOME>/lib and when another app (which required, for example, a
different version of some class) was installed with the .jars IT needed
going into WEB-INF/lib the .jars in <TOMCAT_HOME>/lib "shadowed" the classes
the new app needed.
General consensus here seems (in hindsight) to be that <TOMCAT_HOME>/lib is
***NOT*** the place to put .jar files UNLESS the Tomcat administrator can
ensure that every app that will be installed will be happy with them.
Otherwise, the webapp should keep the .jars it needs in its own WEB-INF/lib
even if that means some duplication of .jar files across the collection of
webapps.
Has anyone else had similar experiences, and what were your solutions?
Thanks,
George McKinney, Developer
tantalus communications inc.
500-1122 Mainland Street
Vancouver, BC, Canada V6B 5L1
george@tantalus.com
Direct 604.726.6753
Main 604.609.0700
Fax 604.609.0705
www.tantalus.com
"When eBusiness experience counts."
Re: Your thoughts on organizing multiple web apps
Posted by Maureen Fisher <mf...@cornell.edu>.
give each developer a separate jvm and context;
give each jvm its own classpath;
give each application its own "webapps" directory and load app-specific jars in the WEB-INF.
For example, we provide a base directory with common jars (ie a customized mailer, security services (we use kerberos) and vaious objects that make life easier). Some jars get updated and are placed alongside the older versions in this directory.
Then using a classpath script that is called from the startup script the developer can pick and choose what jars and what versions to use in creating the application. The app jars are placed in the "webapps" directory are auto-loaded with each restart.
Each webapp has its own server.xml file and startup files. The developer can specify what version jdk to use there too.
This has worked very well, and several people can develop on the same box without effecting other's development efforts.
Of course, your mileage may vary, and this is best used in development only.
HTH...
At 08:52 AM 12/06/2000 -0800, George McKInney wrote:
>We've got a heterogeneous collection of internal applications running under
>the same Tomcat installation, and have recently had some problems.
>
>This collection has "evolved" and changed as we learn more about using
>Tomcat, and the problem seems to be that some webapps (particularly the
>earlier ones) were installed with the .jar files they needed being put into
><TOMCAT_HOME>/lib and when another app (which required, for example, a
>different version of some class) was installed with the .jars IT needed
>going into WEB-INF/lib the .jars in <TOMCAT_HOME>/lib "shadowed" the classes
>the new app needed.
>
>General consensus here seems (in hindsight) to be that <TOMCAT_HOME>/lib is
>***NOT*** the place to put .jar files UNLESS the Tomcat administrator can
>ensure that every app that will be installed will be happy with them.
>Otherwise, the webapp should keep the .jars it needs in its own WEB-INF/lib
>even if that means some duplication of .jar files across the collection of
>webapps.
>
>Has anyone else had similar experiences, and what were your solutions?
>
>Thanks,
>
>George McKinney, Developer
>tantalus communications inc.
>500-1122 Mainland Street
>Vancouver, BC, Canada V6B 5L1
>george@tantalus.com
>
>Direct 604.726.6753
>Main 604.609.0700
>Fax 604.609.0705
>www.tantalus.com
>"When eBusiness experience counts."
Re: Your thoughts on organizing multiple web apps
Posted by Kief Morris <ki...@bitBull.com>.
George McKInney typed the following on 08:52 06/12/2000 -0800
>General consensus here seems (in hindsight) to be that <TOMCAT_HOME>/lib is
>***NOT*** the place to put .jar files UNLESS the Tomcat administrator can
>ensure that every app that will be installed will be happy with them.
>Otherwise, the webapp should keep the .jars it needs in its own WEB-INF/lib
>even if that means some duplication of .jar files across the collection of
>webapps.
I use symlinks (Unix of course) to point from WEB-INF/lib to jar files in
appropriate locations. This makes it easier to keep them updated, and
is especially handy for development.
Kief
---
bitBull makes the Internet bite: http://www.bitBull.com/demos/
RE: Your thoughts on organizing multiple web apps
Posted by CPC Livelink Admin <cp...@fitzpatrick.cc>.
I believe that what you have stated is the generally accepted practice,
though some may argue that there is NO good time to put a jar in the
TOMCAT_HOME/lib directory. If you are on a system that permits it, the use
of links (hard or symbolic) is also suggested to reduce storage space
requirements.
Something else to look for is the system classpath, which tomcat will
inherit on startup, unless you modify tomcat.bat/tomcat.sh or use another
mechanism like the jk service on NT. Having like jars in the system
classpath has bitten me a couple of times when I migrate from development
into production. I have therefore wrapped my tomcat startups with a minimal
classpath which I know I will set on all machines.
Finally, and I invite more enlightened comments on this topic, tomcat has a
'feature' which allows the use of a global web.xml file to supplement the
applications web.xml. Since I believe that this is not a portable feature,
you may want to ensure that you have everything in the applications web.xml
file that you think you will need, and not count on any system defaults.
Regards,
Paul
-----Original Message-----
From: George McKInney [mailto:george@tantalus.com]
Sent: Wednesday, December 06, 2000 11:53 AM
To: 'tomcat user list'
Subject: Your thoughts on organizing multiple web apps
We've got a heterogeneous collection of internal applications running under
the same Tomcat installation, and have recently had some problems.
This collection has "evolved" and changed as we learn more about using
Tomcat, and the problem seems to be that some webapps (particularly the
earlier ones) were installed with the .jar files they needed being put into
<TOMCAT_HOME>/lib and when another app (which required, for example, a
different version of some class) was installed with the .jars IT needed
going into WEB-INF/lib the .jars in <TOMCAT_HOME>/lib "shadowed" the classes
the new app needed.
General consensus here seems (in hindsight) to be that <TOMCAT_HOME>/lib is
***NOT*** the place to put .jar files UNLESS the Tomcat administrator can
ensure that every app that will be installed will be happy with them.
Otherwise, the webapp should keep the .jars it needs in its own WEB-INF/lib
even if that means some duplication of .jar files across the collection of
webapps.
Has anyone else had similar experiences, and what were your solutions?
Thanks,
George McKinney, Developer
tantalus communications inc.
500-1122 Mainland Street
Vancouver, BC, Canada V6B 5L1
george@tantalus.com
Direct 604.726.6753
Main 604.609.0700
Fax 604.609.0705
www.tantalus.com
"When eBusiness experience counts."