title: How to have URLs without a suffix (e.g .action) in Struts 2?
body: <p>Here's the thing, I need to not only serve java, but also some javascript files, with my .war. So e,g. if someone goes to the URL:</p>
  
  <pre><code>example.com/js/foo.jar
  </code></pre>
  
  <p>Then I need that to be properly served as a javascript file. At the same time, if someone goes to:</p>
  
  <pre><code>example.com/bar
  </code></pre>
  
  <p>I need that to be served by Struts2 as a possible controller.</p>
  
  <p>The methods I've found online of removing the suffix from the url, would cause both URls to be served by struts 2 (and hence give an error for the first <code>foo.js</code> file even though it exists). Is there a way (such as an interceptor) which will first check if the given .js file exists, before giving an error?</p>