Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conflicting Jar Files

Status
Not open for further replies.

ajncyn

Technical User
Apr 8, 2004
1
US
If I have a jar file in the common/lib folder in Tomcat and in the same file in the lib folder of my application, which one takes priority?
 
It will load from the yourApp/WEB-INF/lib folder first.

However, "for classes which are part of J2SE (which means it will attempt loading first with its parent classloader before loading from its current repositories, regardless of the current delegation setting). This includes classes from the SAX and DOM APIs, Xalan, Xerces, and any classes which package name starts with "javax.".

For the later case, it will load from
1. Shared
2. Common/endorsed,
3. Common/lib,
4. JAVE_HOME/lib,
finally yourApp/WEB-INF/lib

For detail:
 
As an addition - this behaviour is correct for tomcat4/5 but with tomcat3, jar in the lib dir would overrride webapp jars ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top