java ee - Tomcat filter not invoked for files outside of WEB-INF folder -



java ee - Tomcat filter not invoked for files outside of WEB-INF folder -

evrything fine on localhost!!! using tomcat 7.0.53, having css, js, images ressources out of web-inf folder. accessing them :

${pagecontext.request.contextpath}/resources/css/file.css

in web.xml file have filter witch trying set response header ressource files

<filter> <filter-name>thefilter</filter-name> <filter-class>packages.thefilter</filter-class> </filter> <filter-mapping> <filter-name>thefilter</filter-name> <url-pattern>/ressources/*</url-pattern> <url-pattern>*.png</url-pattern> <url-pattern>*.gif</url-pattern> <url-pattern>*.jpg</url-pattern> <url-pattern>*.jpeg</url-pattern> <url-pattern>*.css</url-pattern> <url-pattern>*.js</url-pattern> </filter-mapping>

as said works fine on localhost. 1 time online filter caches declared servlet urls!

must sai have 2 others filter needed app work, cause i'm using struts2 3.16.3

i tried many combinations url-patterns (one /ressources/* , or *.extension still have same problem)

any thought wrong here?

my app uses https

try

<url-pattern>/*</url-pattern>

this @ to the lowest degree identify root of problem lies.

java-ee tomcat web struts2 servlet-filters

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -