title: About Servlet binding patterns and default servlet
body: <p>I have a Servlet I want to bind to <code>"/"</code> pattern. After that, all works fine for all URLs including application root but I also need the <code>default</code> servlet for static files support.</p>
  
  <p>After I add it into web.xml this way I got <code>404</code> error at the application root URL, but all other URLs are still successfully handled by the Servlet assigned to <code>"/"</code>.</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;servlet-mapping&gt;
    &lt;servlet-name&gt;default&lt;/servlet-name&gt;
    &lt;url-pattern&gt;*.html&lt;/url-pattern&gt;
    &lt;url-pattern&gt;*.css&lt;/url-pattern&gt;
    &lt;url-pattern&gt;*.js&lt;/url-pattern&gt;
  &lt;servlet-mapping&gt;
  </code></pre>
  
  <p>After I bind the Servlet also to <code>""</code> pattern it works fine. How I understand this pattern is related to the root URL of the application.</p>
  
  <p>Could you help me to find out the reasons for such behavior? </p>
  
  <p>P.S. I check the behavior with TomCat and Undertow.</p>