[jbosstools-issues] [JBoss JIRA] (JBIDE-11068) Wrong error: This parameter type (javax.servlet.http.HttpServletRequest) cannot be annotated with @Context

Max Rydahl Andersen (JIRA) jira-events at lists.jboss.org
Tue Feb 28 09:31:37 EST 2012


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

Max Rydahl Andersen updated JBIDE-11068:
----------------------------------------

    Assignee: Xavier Coulon  (was: Max Rydahl Andersen)

    
> Wrong error: This parameter type (javax.servlet.http.HttpServletRequest) cannot be annotated with @Context
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-11068
>                 URL: https://issues.jboss.org/browse/JBIDE-11068
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: Webservices
>    Affects Versions: 3.3.0.Beta1
>         Environment: Win7 64bit
> Eclipse 3.7.2 64bit
>   JBoss JAX-RS Tools	1.2.2.v20120217-1720-H797-Beta1	org.jboss.tools.ws.jaxrs.feature.feature.group	JBoss by Red Hat
>   JBoss Maven Integration	1.3.0.v20120215-1811-H563-Beta1	org.jboss.tools.maven.feature.feature.group	JBoss by Red Hat
>   JBoss Maven JAX-RS Configurator	1.3.0.v20120215-1811-H563-Beta1	org.jboss.tools.maven.jaxrs.feature.feature.group	JBoss by Red Hat
>   JBoss WebServices Tools	1.2.2.v20120217-1720-H797-Beta1	org.jboss.tools.ws.feature.feature.group	JBoss by Red Hat
>            Reporter: Ron Ratovsky
>            Assignee: Xavier Coulon
>             Fix For: 3.3.0.Beta1
>
>         Attachments: JBIDE-11068.patch
>
>
> Upon checking in the channel with maxandersen, he found that the following code is related:
> * Validates that the method parameters annotated with {@link Context} are of the supported types in the spec:
> * {@link UriInfo}, {@link HttpHeaders}, {@link ServletConfig}, {@link ServletContext}, {@link HttpServletRequest},
> * {@link Request}, {@link HttpServletResponse} and {@link Response}
> ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsResourceMethod.java
> According to the above javadoc, @Context is legal with HttpServletRequest.
> However, the plugin produces an error on the following line of code (for example):
> public Response get(@Context HttpServletRequest requestContext,	@PathParam(EntitiesRestConsts.PARAM_ID) ObjectId id) {

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list