title: How to define 2 servlets in 1 web.xml
body: <p>I have tried <a href="https://stackoverflow.com/questions/8016805/adding-multiple-servlets-in-single-web-xml">this</a>, <a href="https://stackoverflow.com/questions/11460977/multiple-jersey-servlets-in-one-single-web-xml">this</a> and <a href="https://stackoverflow.com/questions/1865088/how-to-register-multiple-servlets-in-web-xml-in-one-spring-application">this</a>. The examples use a different framework. I'm using Atmosphere + Jersey. I want to know <strong>how to configure 2 servlets</strong> in a single web.xml.
  <strong>EDIT:</strong>
  web.xml</p>
  
  <pre><code>&lt;servlet&gt;
      &lt;description&gt;AtmosphereServlet&lt;/description&gt;
      &lt;servlet-name&gt;AtmosphereServlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.atmosphere.cpr.AtmosphereServlet&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.example.package1&lt;/param-value&gt;
      &lt;/init-param&gt;
  &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;AtmosphereServlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  &lt;servlet&gt;
      &lt;description&gt;Admin&lt;/description&gt;
      &lt;servlet-name&gt;Admin&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.atmosphere.cpr.AtmosphereServlet&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.example.package2&lt;/param-value&gt;
      &lt;/init-param&gt;
  &lt;load-on-startup&gt;2&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Admin&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/admin/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>