title: Multiple JAX-RS applications in the same WAR
body: <p>I have</p>
  
  <pre><code>@ApplicationPath("/resourcesP")
  public class RestfulPrediction extends Application {
      @Override
      public Set&lt;Class&lt;?&gt;&gt; getClasses() {
      Set&lt;Class&lt;?&gt;&gt; set = new HashSet&lt;Class&lt;?&gt;&gt;();
          set.add(PredictionsRS.class);
          return set;
      }
  }
  </code></pre>
  
  <p>And</p>
  
  <pre><code>@ApplicationPath("/resourcesA")
  public class RestfulAdage extends Application {
      @Override
      public Set&lt;Class&lt;?&gt;&gt; getClasses() {
      Set&lt;Class&lt;?&gt;&gt; set = new HashSet&lt;Class&lt;?&gt;&gt;();
          set.add(Adages.class);
          return set;
      }
  }
  </code></pre>
  
  <p>Two different ApplicationPath and the class are as follows.</p>
  
  <pre><code>@Path("/")
  public class service.Adages {}
  
  @Path("/")
  public class webservices.PredictionsRS {}
  </code></pre>
  
  <p>Both of them are declared in different ApplicationPath. I'm using Jersey and the config in web.xml looks like</p>
  
  <pre><code>  &lt;servlet&gt;  
      &lt;servlet-name&gt;jersey&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;
              service
              webservices
          &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>And I'm getting</p>
  
  <blockquote>
    <p>SEVERE: Conflicting URI templates. The URI template / for root
    resource class  service.Adages and the URI template / transform to the
    same regular expression (/.*)?</p>
  </blockquote>
  
  <p>Why if I have two different ApplicationPath this exception comes at startup ?</p>
  
  <p>If I take out a package in param-value this works, also if I change one of the @Path annotations this works, so it is a problem with my configuration ?</p>
  
  <p>I'm using Jersey 1.10. Thanks all.</p>