I found what exactly makes problem.
If you have configuration like that <Host name="test.com" appBase="webapps" .. where appBase is exactly webapps everything works fine.
But when you change appBase to something else e.g. appBase="webapps/someApp" (it must be different from webapps) cacheFilter is not called
when css and js is served by tomcat.
It is realy strange and I it looks like bug in tomcat (or maybe my knowledge about tomcat is not sufficient ..).
My workaround for this bug was to change configuration for something like this:
<Host name="app1.com" appBase="webapps".. >
<Context path="" docBase="Absolute path to app1. App1 must be outside webapps dir !"/>
</Host>
<Host name="app2.com" appBase="webapps".. >
<Context path="" docBase="Absolute path to app2. App2 must be outside webapps dir !"/>
</Host>
In such configuration everything works fine. Filter is called as it should.
I found what exactly makes problem.
If you have configuration like that <Host name="test.com" appBase="webapps" .. where appBase is exactly webapps everything works fine.
But when you change appBase to something else e.g. appBase="webapps/someApp" (it must be different from webapps) cacheFilter is not called
when css and js is served by tomcat.
It is realy strange and I it looks like bug in tomcat (or maybe my knowledge about tomcat is not sufficient ..).
My workaround for this bug was to change configuration for something like this:
<Host name="app1.com" appBase="webapps".. >
<Context path="" docBase="Absolute path to app1. App1 must be outside webapps dir !"/>
</Host>
<Host name="app2.com" appBase="webapps".. >
<Context path="" docBase="Absolute path to app2. App2 must be outside webapps dir !"/>
</Host>
In such configuration everything works fine. Filter is called as it should.