Environment:
- Jboss 5.2
- Servlet 2.4
- Java 7
I'm trying to execute a filter requests ONLY when the application context path is called but I didn't find any way with url-pattern, because url-pattern /* take all requests.
I would like to execute a filter when request this url http://localhost:8080/myapp but the filter is not triggered.
<filter-mapping>
<filter-name>PrincipalFilter</filter-name>
<url-pattern>/</url-pattern>
</filter-mapping>
I also tried with emtpy string but I got an error on parsing web.xml on deploying, maybe the server is too old.
Any ideas?