1) être en servlet 2.4 ou +
Il faut donc utiliser le bon schema au niveau du fichier web.xml
Tourner sous un Tomcat 5.5 ou +
2) utiliser l'élément
Attention au risque de boucle infinie !
Plus de détails :
http://www.ibm.com/developerworks/java/library/j-tomcat2/#N10082
Extrait de la spec servlet 2.4 :
SRV.6.2.5 Filters and the RequestDispatcher
New for version 2.4 of the Java Servlet specification is the ability to configure filters
to be invoked under request dispatcher forward() and include() calls.
By using the new
developer can indicate for a filter-mapping whether he would like the filter to be
applied to requests when:
1. The request comes directly from the client.
This is indicated by a
or by the absence of any
2. The request is being processed under a request dispatcher representing the
Web component matching the
call.
This is indicated by a
3. The request is being processed under a request dispatcher representing the
Web component matching the
call.
This is indicated by a
4. The request is being processed with the error page mechanism specified in "Error
Handling" on page 73 to an error resource matching the
This is indicated by a
5. Or any combination of 1, 2, 3, or 4 above.