[jboss-jira] [JBoss JIRA] (WFLY-2162) <servlet-name> does not work in <filter-mapping>
Nick Howes (JIRA)
jira-events at lists.jboss.org
Thu Sep 26 06:41:02 EDT 2013
[ https://issues.jboss.org/browse/WFLY-2162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12807541#comment-12807541 ]
Nick Howes commented on WFLY-2162:
----------------------------------
That seems to work okay... although having tested a bit further, the {{url-pattern}} on its own appears to work okay for us too. So I think using url-pattern might be an acceptable workaround for us because of the special behaviour of the '/' mapping and the fact that we 're applying the filters to the default servlet. But it's probably continuing to ignore the servlet-name element. servlet-name on its own has worked for us in JBoss 5 (which we use mostly at the moment).
> <servlet-name> does not work in <filter-mapping>
> ------------------------------------------------
>
> Key: WFLY-2162
> URL: https://issues.jboss.org/browse/WFLY-2162
> Project: WildFly
> Issue Type: Bug
> Components: Web (Undertow)
> Affects Versions: 8.0.0.Alpha4
> Reporter: Nick Howes
> Assignee: Stuart Douglas
>
> I have a filter mapped in web.xml with a <filter-mapping> and a <servlet-mapping> element set to the value of a servlet, but the filter is never run. If I replace the <servlet-mapping> element with <url-pattern>/</url-pattern>, the filter runs, but it also runs for all other servlets.
> The servlet and filter in question:
> {code:xml}
> <servlet>
> <servlet-name>spring</servlet-name>
> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
> <load-on-startup>1</load-on-startup>
> </servlet>
> <servlet-mapping>
> <servlet-name>spring</servlet-name>
> <url-pattern>/</url-pattern>
> </servlet-mapping>
> <filter>
> <filter-name>filters</filter-name>
> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
> </filter>
> <filter-mapping>
> <filter-name>filters</filter-name>
> <servlet-name>spring</servlet-name>
> <!-- <url-pattern>/</url-pattern> -->
> </filter-mapping>
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list