• 2 replies
  • Latest Post - ‏2013-05-17T19:33:18Z by gifty
1 Post

Pinned topic Filter mapping with multiple url-patterns in WAS

‏2013-04-22T16:14:44Z | filter jsf


The following problem occurred on WAS7 and 8.
I have this filter mapping in the web.xml of my web application:



It works good for most pages, but the problem is that the filter FilterXY is applied two times in a row for the page /pages/init/home.jsf, because it matches moth url patterns.
An important thing to note is that when the application runs on JBoss, there is no problem, the filter is applies only once.

Is it normal, that if a URL is matched against more url patterns in the filter mapping, the linked filter is applied as many times as there is matches?
I have been searching for an answer for a long time, but to no conclusion. Any information would be very appreciated.

Thank you very much for your help.


Updated on 2013-04-22T16:20:15Z at 2013-04-22T16:20:15Z by danooo
  • BrianSPaskin
    6454 Posts

    Re: Filter mapping with multiple url-patterns in WAS


    Hi, That should not be the case.  Can you also list the other filters and mappings?  The Servlet Spec indicates that the next filter will be executed when done with the current filter. 



  • gifty
    18 Posts

    Re: Filter mapping with multiple url-patterns in WAS


    can user share the web.xml.

    The Java Servlet Spec does not define if the filterchain can or cannot have duplicate filter entries when filter is mapped to multiple url pattern which maps to inbound request uri.