tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: how to use VirtualWebappLoader - either in META-INF/context.xml or programmatically on startup
Date Fri, 01 Jul 2011 01:55:17 GMT
Hash: SHA1


On 6/30/2011 5:27 PM, Rainer Jung wrote:
> On 30.06.2011 22:50, Christopher Schultz wrote:
>> Konstantin,
>> On 6/30/2011 11:27 AM, Konstantin Kolinko wrote:
>>> 2011/6/30 Bob DeRemer <>:
>>>>           virtualClasspath="/WEB-INF/lib/extensions/*.jar"/>
>>> The above should be an absolute path.
>>> You can use system variables, e.g.
>>> ${catalina.base}/webapps/mywebapp/WEB-INF/lib/extensions/*.jar
>> Hmm... does that mean that VirtualWebappLoader can't be used with paths
>> inside WAR files? Being able to support paths relative to the webapp
>> would be quite nice.
> I always thought the main use case for VWL is to be able to extend wars
> by adding things outside without patching them into the war. So sticking
> to one identical war and adding variations about the deployment
> environment, like resources needed for configuration, on the outside.

That's a good point: if you need truly exotic class loading
requirements, such as being able to re-load certain libraries for only a
portion of your webapp (a la JSP or AXIS services), then using VWL isn't
really what you're looking for.

> If you add classes, ressources or jar files inside the war, then I don't
> see any obvious reason not to include them in the standard places.

If the VirtualWebappLoader allowed certain JARs to be placed /before/
WEB-INF/classes and WEB-INF/lib/*.jar, then a webapp could also include
external patches without modifying the WAR.

I'm not sure that's a truly useful feature, though ;)

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message