title: When do I need to include Jersey ServletContainer in web.xml to enable JAX-RS?
body: <p>When do I need to include the following snippet in web.xml in order to activate Jersey?</p>
  
  <pre><code>&lt;servlet&gt;
      &lt;servlet-name&gt;Jersey App&lt;/servlet-name&gt;
      &lt;servlet-class&gt;com.sun.jersey.spi.container.servlet.ServletContainer&lt;/servlet-class&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;com.sun.jersey.config.property.packages&lt;/param-name&gt;
          &lt;param-value&gt;com.company.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 it App. Server dependent if Jersey is activated by default or needs this web.xml entry?</p>
  
  <p>If an App. Server does not require the code above, can I configure the servlet-mapping path, like:</p>
  
  <pre><code>&lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Jersey App&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/rest/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>