[jboss-jira] [JBoss JIRA] Resolved: (AS7-1674) Remove or explain why web.xml is needed for RESTful endpoints

Stuart Douglas (JIRA) jira-events at lists.jboss.org
Sun Sep 4 18:43:26 EDT 2011


     [ https://issues.jboss.org/browse/AS7-1674?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart Douglas resolved AS7-1674.
---------------------------------

      Assignee: Stuart Douglas  (was: Bill Burke)
    Resolution: Won't Fix


According to the JAX-RS spec there are three ways to activate a restful endpoint. These three methods are specified in the JAX-RS 1.1 specification in section 2.3.2.

1) Not including an application class and using web.xml as described above
2) subclassing javax.ws.rs.core.Application and using web.xml 
3) subclassing javax.ws.rs.core.Application and using the ApplicationPath annotation.

See https://docs.jboss.org/author/display/AS7/JAX-RS+Reference+Guide

The idea that resteasy should be activated if there happens to be a JAX-RS annotation in the deployment does not really work. For one thing, where would you map it to? For another, this means that if a 3rd party app library includes a class with a JAX-RS annotation then resteasy would be activated wether you wanted it or not.


 

> Remove or explain why web.xml is needed for RESTful endpoints
> -------------------------------------------------------------
>
>                 Key: AS7-1674
>                 URL: https://issues.jboss.org/browse/AS7-1674
>             Project: Application Server 7
>          Issue Type: Task
>          Components: REST
>            Reporter: Thomas Diesler
>            Assignee: Stuart Douglas
>
> While documenting RESTful endpoints I noticed that 
> {code:xml}
> <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>
> {code}
> is needed. Is it not possible to use the annotation index to determine whether a *.war contains RESTful endpoints?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list