Hello,

I'm trying to get filter mapping working in Windows Tomcat 6.0.20. I can get it to work one way but not another.

I have 2 virtual hosts where filter mapping on one host is working (I get a hit) and another host that does not work (no hits)

Here are the 2 virtual hosts as seen in Server.xml file :

Fails (no hits)
      <Host name="ft.com"  appBase="c:/FilterTest"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
      </Host>


Works (I get hits)
      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">

      </Host>

Here is my filter :

 <filter>
    <filter-name>FileAccessFilter</filter-name>
    <filter-class>com.mcs.webapp.filter.FileAccessFilter</filter-class>
   </filter>

   <filter-mapping>
    <filter-name>FileAccessFilter</filter-name>
    <url-pattern>/Proofs/*</url-pattern>
   </filter-mapping>

If I type the following I get a hit (Using Second host from above) :
http://localhost/Proofs/1/calendar.png

If I type the following I DO NOT get a hit (Using First host from above) :
http://ft.com/Proofs/1/calendar.png

In both cases the png image is found and displayed in the browser.

My guest is it has something to do with the appBase where the one that
works is :
appBase="webapps"

and the one that fails is :
appBase="c:/FilterTest"

Any help would be greatly appreciated.

Thanks

Reply via email to