tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Ruthenbeck <just...@nextengine.com>
Subject Re: Best practice question: where to place project libraries
Date Wed, 11 Feb 2004 00:36:08 GMT
At 04:16 PM 2/10/2004, you wrote:
>I need servlet-api.jar to compile my project. I may need some of the 
>commons-beans stuff in the future. Should I put these libs in my 
>projects lib folder (and then in the war) or should I rely on the tomcat 
>versions? If the latter, which jar will be used, and what should I do if 
>I deploy to a different container?
>
>I'm leaning toward duplicating the libraries (this removes an 
>environment dependancy, too), but I'd like some advice.

As a general rule, strive to keep your webapp self-contained and 
autonomous with only J2EE-standard dependencies (things like JNDI objects 
that are configurable in every container).  Unless there's a reason not 
to (JDBC drivers is one common one), package your own dependent libraries 
with your app -- it frees you from versioning problems (maintaining the 
correct library versions for your app over time) and makes migration 
between containers much easier.

If you're actively supporting multiple containers, it's practically 
required.

justin



______________________________________________
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
______________________________________________


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message