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

Validate servlet name 'javax.ws.rs.core.Application' or any subtype

XMLWordPrintable

    • Hide

      Set validation level to ignore for 'Invalid servlet reference'

      Show
      Set validation level to ignore for 'Invalid servlet reference'

      The 'JAX-RS Application' is the top level fragment of the URI Path Templates of the JAX-RS Endpoints.
      One way to configure it is in the webapp's deployment descriptor, with something like this:

      <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
          <servlet-mapping>
              <servlet-name>javax.ws.rs.core.Application</servlet-name>
              <url-pattern>/*</url-pattern>
          </servlet-mapping>
      </web-app>
      

      see JBossAS 7 / JAX-RS docs here

      Hélas, the web.xml validator reports an error (or a warning) with the following message

      servlet-name references to javax.ws.rs.core.Application that is not a servlet

      For sure, the validation level could be set to ignore, but could this JAX-RS specific rule be implemented by default ?

              scabanovich Viacheslav Kabanovich (Inactive)
              xcoulon@redhat.com Xavier Coulon
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: