title: Struts 2 - Removing action from url
body: <p>I have been searching for methods to remove <code>.action</code> suffix extension from the url in Struts 2. I have gone through various variations of similar codes. For eg:</p>
  
  <pre><code>&lt;constant name = "struts.action.extension" value = ""/&gt;
  </code></pre>
  
  <p>and </p>
  
  <pre><code>&lt;constant name = "struts.action.extension" value = ","/&gt;
  </code></pre>
  
  <p>but to no effect. My site it keeps on redirecting to <code>/xyz.action</code> and gives an error of Resource not Found when I specify the url to be <code>/xyz</code>. I am using <code>Struts 2.2.3</code>. Can some one please tell me what to do to achieve this? Is there a possibility that the problem pertains to web.xml rather than struts.xml?</p>
  
  <p>web.xml</p>
  
  <pre><code>&lt;filter&gt;
      &lt;filter-name&gt;UrlRewriteFilter&lt;/filter-name&gt;
      &lt;filter-class&gt;org.tuckey.web.filters.urlrewrite.UrlRewriteFilter&lt;/filter-class&gt;
  &lt;/filter&gt;
  
  &lt;filter-mapping&gt;
      &lt;filter-name&gt;UrlRewriteFilter&lt;/filter-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
  &lt;/filter-mapping&gt;
  </code></pre>
  
  <p>there are various other filters like session, email, transaction etc. and a servlet.</p>