I have created a servlet filter to handle session timeout and authentication.
@WebFilter(urlPatterns={"/acc/*"})
public class ResourceAuthorizationFilter implements Filter { ... }
The pages that I want to filter have a pattern like this: /acc/login-flow
, /acc/profiles-flow
. The filter gets called also for resources(css, js and images). How can I configure the urlPatterns to exclude from filtering these resources?
EDIT1
Here are some urls that are filtered:
http://localhost:8081/acme-0.0.1/acc/login-flow
http://localhost:8081/acme-0.0.1/acc/javax.faces.resource/theme.css
http://localhost:8081/acme-0.0.1/acc/javax.faces.resource/jquery/jquery.js
http://localhost:8081/acme-0.0.1/acc/javax.faces.resource/primefaces.js
http://localhost:8081/acme-0.0.1/acc/javax.faces.resource/ajax.gif
http://localhost:8081/acme-0.0.1/acc/javax.faces.resource/login.png
http://localhost:8081/acme-0.0.1/acc/javax.faces.resource/header.png
http://localhost:8081/acme-0.0.1/acc/javax.faces.resource/images/ui-bg_flat_75_ffffff_40x100.png
http://localhost:8081/acme-0.0.1/acc/javax.faces.resource/images/default.png
http://localhost:8081/acme-0.0.1/acc/javax.faces.resource/images/ui-icons_888888_256x240.png
I have some custom css/js files under webapp/resources
folder, but these ones are not from there.
The acc
part comes from:
<servlet-mapping>
<servlet-name>Spring MVC Servlet</servlet-name>
<url-pattern>/acc/*</url-pattern>
</servlet-mapping>
EDIT2
These code samples come from a project that is implemented with JSF 2.0, PrimeFaces 3.4.1, Spring 3.0.5.RELEASE, Spring Security 3.0.3.RELEASE and Spring Web Flow 2.3.0.RELEASE.