I've written a Java web filter to handle my JSF application's security. I've the filter's mapping like this:
<filter-mapping>
<filter-name>authFilter</filter-name>
<url-pattern>/secure/*</url-pattern>
<url-pattern>/login.jsf</url-pattern>
<url-pattern>/*.js.jsf</url-pattern> <--- invalid pattern
</filter-mapping>
and now i want to create a url-pattern to filter all javascript files. I'm using Primefaces, so the .js files are retrived in URLs like this:
http://localhost:8080/MyProject/javax.faces.resource/MyJavascriptFile.js.jsf?ln=MyLibrary
I cant filter the whole javax.faces.resouces
because it also holds the CSS files. Is there a way to create a URL pattern to match only javascripts?