Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-22464

Jax-RS validation and browser doesn't understand mulitple jax-rs applicaitons in same project

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 4.30.x
    • 4.4.0.Alpha2
    • webservices
    • None

      I'm testing an application with 2 Jax-RS application servlets. I've defined then in the web.xml as follows (I'm not using annotations):

      	<servlet-mapping>
      		<servlet-name>my.app.services.RestServices</servlet-name>
      		<url-pattern>/api/*</url-pattern>
      	</servlet-mapping>
      	<servlet-mapping>
      		<servlet-name>my.app.pages.WebPages</servlet-name>
      		<url-pattern>/pages/*</url-pattern>
      	</servlet-mapping>
      

      This cause a few issues:

      • in web.xml "Multiple JAX-RS Activators are defined for the project." (error by default, I set it to warning)
      • in the RestfulServices class, "The Application Path should be configured with an @ApplicationPath annotation or in the web deployment descriptor." error. It seems like the validator ignores a part of the web.xml
      • In Project Explorer, the "Jax-RS Services" node shows incorrect children: it shows api/ endpoints under pages/api/... whereas pages and api are "siblings".

            Unassigned Unassigned
            mistria@redhat.com Mickael Istria
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: