Hi all,
I am trying to configure the Tomcat inbuilt filter
(tomcat.valves.CiscoResponseHeaderFilter) into my $TOMCAT_HOME/conf/web.xml
<filter>
<filter-name>CSRF</filter-name>
<filter-class>org.apache.catalina.filters.CsrfPreventionFilter</filter-class>
<init-param>
<param-name>entryPoints</param-name>
<param-value>/index.jsp</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CSRF</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
But after doing this Tomcat server stuck in starting status and do not
starts completely.
If I comment out the filter, Tomcat starts properly.
I verified the web.xml of Tomcat manager (
$TOMCAT_HOME/webapps/manager/WEB-INF/web.xml) where this filter is
configured by default and found that in below is used in filter mapping
<filter-mapping>
<filter-name>CSRF</filter-name>
<servlet-name>HTMLManager</servlet-name>
<servlet-name>jsp</servlet-name>
</filter-mapping>
So when use the same in $TOMCAT_HOME/conf/web.xml, Tomcat works properly.
Why i am not able to map the filter to /* url?
What is the difference between using servlet name and url pattern ?
Can anyone provide the inputs and help in this regard.
Thanks for your time in advance.
-Utkarsh