We're running tomcat 6.0.32 64-bit on Windows Server 2008 R2.  We have a 
requirement to support pluggable extensions to our webapp.  We do not want the 
associated JAR(s) in the WEB-INF/lib directory.  Instead, we want to place them 
in a WEB-INF/lib/extensions folder that we created.

To do this, I need to inform my webapp class loader about the extra repository. 
 From looking at VirtualWebappLoader, this looks like just what I need.

Problem is - I can't seem to get this to work.  I have created a context.xml 
file and placed it in our META-INF folder.  The contents are:

<?xml version="1.0" encoding="UTF-8"?>
<Context>
   <Loader className="org.apache.catalina.loader.VirtualWebappLoader"
           virtualClasspath="/WEB-INF/lib/extensions/*.jar"/>
</Context>

>From reading the tomcat documentation, it seems like Tomcat should 
>automatically detect the context.xml file and add the classloader, but it 
>doesn't seem to be looking in this extra directory.  I've tried adding a path 
>attribute to the Context element, but that didn't help.

If anyone can clarify how to use this, I would greatly appreciate it.

Thanks in advance,
-bob

Reply via email to