title: many url-pattern for the same servlet
body: <p>I need to map the same servlet on two different url. I used netbeans 7.0.1 for managing my whole project, so I used its friendly interface to modify the web.xml file. What netbeans created is this:</p>
  
  <pre><code>&lt;servlet-mapping&gt;
      &lt;servlet-name&gt;fred&lt;/servlet-name&gt;
      &lt;url-pattern&gt;*.jsp&lt;/url-pattern&gt;
      &lt;url-pattern&gt;/url&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>This is read by tomcat 5.5 without emitting any error, but only the second pattern works, while the first one is ignored.</p>
  
  <p>Googling I found that the right way for tomcat is this one:</p>
  
  <pre><code>&lt;servlet-mapping&gt;
      &lt;servlet-name&gt;fred&lt;/servlet-name&gt;
      &lt;url-pattern&gt;*.jsp&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;fred&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/url&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>So, my questions: is this a bug in tomcat? What syntax do other containers accept?</p>