Sebastien,

On 11/19/15 8:37 AM, Tardif, Sebastien wrote:
> Have two wars in the same Tomcat instance, I want to share some 
> jars. I want these jars take priority over Tomcat shipped jars.
> 
> However, because I usually reuse the same Tomcat installation 
> between application (different set of wars), I do not want to modify 
> common.loader folder (the lib folder). Because if I modify the lib 
> folder for application 1, like overriding some Tomcat jar, then it’s
> lot of work to reset it right.
> 
> That problem doesn’t exist with EAR, which Tomcat doesn’t support. 
> I’m fine that Tomcat doesn’t support EAR but it could at least
> provide clean workaround.
> 
> So I would like to see a new folder called: extraLibs, and the
> classloader order will become:
> 
> 
> Bootstrap classes of your JVM
> System class loader classes (described above)
> extraLibs
> Common class loader classes (described above)
> /WEB-INF/classes of your web application
> /WEB-INF/lib/*.jar of your web application
> 
> See http://tomcat.apache.org/tomcat-7.0-doc/class-loader-howto.html

What about simply modifying CATALINA_BASE/bin/setenv.sh|SETENV.BAT to
set a custom CLASSPATH that includes those libraries? You have to modify
nothing else, and it easily survives an upgrade.

-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to