title: Struts2 exclude pattern - How exactly does it work?
body: <p>I'm trying to migrate a Struts2 app (version 2.2.1.1) to Spring MVC and I'm having a tough time getting the struts.xml mappings converted over to SpringMVC servlet mappings.</p>
  
  <p>My first question is how exactly the Struts2 exclude pattern works. Let's say in my web.xml I have a filter / mapping for struts2 set up as follows :</p>
  
  <pre><code>&lt;filter&gt;
      &lt;filter-name&gt;struts2&lt;/filter-name&gt;
      &lt;filter-class&gt;org.apache.struts2.dispatcher.FilterDispatcher&lt;/filter-class&gt;
  &lt;/filter&gt;
  
  &lt;filter-mapping&gt;
    &lt;filter-name&gt;struts2&lt;/filter-name&gt;
    &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
  &lt;/filter-mapping&gt;
  </code></pre>
  
  <p>In my struts.xml I have a bunch of actions defined which are already working. Now from my understanding, based on the struts2 documentation -</p>
  
  <p>(Since Struts 2.1.7, you are able to provide a comma seperated list of patterns for which when matching against the
  request URL the Filter will just pass by. This is done via the configuration option struts.action.excludePattern, for example in your struts.xml) -</p>
  
  <p>if I add a exclude pattern such as :</p>
  
  <pre><code>&lt;constant name="struts.action.excludePattern" value="/*"/&gt;
  </code></pre>
  
  <p>Then the filter should be bypassed and the actions mentioned above shouldn't resolve, correct?</p>
  
  <p>For some reason this isn't happening and all my actions are still being routed appropriately. </p>
  
  <p>What gives?</p>