title: Jersey Servlet finds resources when url-pattern is /* but cannot find resources when url-pattern is /
body: <p>I'm writing a Web service, using Jersey 2.17 with Tomcat 8.</p>
  
  <p>In the web.xml when I change my url pattern to /* I'm able to hit the web-service and get response.
  However when I change the url pattern to / then I always get 404 Error (resource not found).</p>
  
  <p><strong>Doesn't work</strong></p>
  
  <pre><code>&lt;servlet-mapping&gt;
      &lt;servlet-name&gt;jersey-servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/&lt;/url-pattern&gt; 
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p><strong>Work's Perfectly</strong></p>
  
  <pre><code>&lt;servlet-mapping&gt;
      &lt;servlet-name&gt;jersey-servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt; 
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>My web.xml contains no other Servlet or Filter mappings apart from this.</p>
  
  <pre><code>&lt;servlet&gt;
          &lt;servlet-name&gt;jersey-servlet&lt;/servlet-name&gt;
          &lt;servlet-class&gt;
               org.glassfish.jersey.servlet.ServletContainer
          &lt;/servlet-class&gt;
          &lt;init-param&gt;
               &lt;param-name&gt;jersey.config.server.provider.packages&lt;/param-name&gt;
               &lt;param-value&gt;com.bandi.rest&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
  </code></pre>
  
  <p>Is there any other configuration needed to make this work?
  I cannot afford to use /* as the servlet mapping because I need certain Filters to run before this servlet gets executed. If the filter fails then the call to servlet should not go ahead.</p>
  
  <p>So basically I don't want to override any mappings that are already present.</p>