Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-1166

Servlet javax.ws.rs.core.Application not defined in web.xml

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.4.1.Final
    • 1.4.0.Final
    • None
    • None

    Description

      Hi,

      When seting up REST, Forge creates the following servlet mapping :

      <servlet-mapping>
          <servlet-name>javax.ws.rs.core.Application<servlet-name>
          <url-pattern>/rest/*</url-pattern>
      </servlet-mapping>
      

      But in GlassFish 3.x and 4.0 this doesn't work because the servlet is not declared. You need to add the following to make it work :

      <servlet> 
          <servlet-name>javax.ws.rs.core.Application</servlet-name>
          <load-on-startup>1</load-on-startup>
      </servlet>
      

      I read Lincoln's comment on that (sorry, can't find where, it was in a JIRA comment) that this was in the spec and that the app server should define it. I couln't find this requirement in the JAX-RS spec but maybe it's written somewhere else (Servlet ?). But I think it would be good to add it anyway, so it would work will all app servers.

      PS : same behaviour in Forge 1.3.3-Final

      Attachments

        Activity

          People

            rhn-support-ggastald George Gastaldi
            agoncal Antonio Goncalves (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: