title: Angular App deployed on tomcat as war
body: <p>I'd like to deploy a <em>single page application (SPA)</em> written in Angular with a bunch of static files, including *.css, <em>.js, /assets/</em> within a war file on tomcat.</p>
  
  <p>The problem is, every path given by the user which doesn't match one of the existing files should deliver index.html.</p>
  
  <p>I started with this web.xml configuration:</p>
  
  <pre><code>[...]
    &lt;servlet&gt;
      &lt;servlet-name&gt;index&lt;/servlet-name&gt;
      &lt;jsp-file&gt;/index.html&lt;/jsp-file&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;index&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
    [...]
  </code></pre>
  
  <p>Unfortunately this <em>index</em> also matches existing, static files.</p>
  
  <p>Do you have any idea how to solve this? </p>