servlets - Filter not invoked for files outside /WEB-INF folder -


everything fine on localhost! using tomcat 7.0.53, having css, js, images resources 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 resource 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. once 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 idea wrong here?

my app uses https

try

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

this @ least identify root of problem lies.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -