title: Asterisk(wild card match) and url-pattern
body: <p>I'd like to have an "explicit" servlet for a particular URL and a default(sort of a catch-all) servlet to handle all other URLs. So I created the web.xml file like this :</p>
  
  <pre><code>  &lt;servlet&gt;
      &lt;servlet-name&gt;My myindex.html servlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;in.shakir.web.MyIndexServlet&lt;/servlet-class&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;My myindex.html servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/myindex.html&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  
    &lt;servlet&gt;
       &lt;servlet-name&gt;My all others servlet&lt;/servlet-name&gt;
       &lt;servlet-class&gt;in.shakir.web.MyHandlerServlet&lt;/servlet-class&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
       &lt;servlet-name&gt;My all others servlet&lt;/servlet-name&gt;
       &lt;url-pattern&gt;*&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>However it is not working(I get 404 error even for /myindex.html)
  I am using Tomcat 7.</p>
  
  <p>But if I remove second (default or catch-all) part from my web.xml, then myindex.html works fine. So whats wrong with my url-pattern ? Please advise.</p>