You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergey Beryozkin (JIRA)" <ji...@apache.org> on 2012/12/19 17:47:12 UTC
[jira] [Commented] (CXF-4471) Multiple servlet mapping does not
work when resolving JAXRS URL
[ https://issues.apache.org/jira/browse/CXF-4471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13536105#comment-13536105 ]
Sergey Beryozkin commented on CXF-4471:
---------------------------------------
Sorry - I missed this JIRA.
When a single endpoint is shared between multiple servlets, the address overwriting has to be disabled:
http://cxf.apache.org/docs/jaxrs-services-configuration.html#JAXRSServicesConfiguration-DynamicservletsandasingleJAXRSendpoint
That will def fix it for you; I'll resolve it as not a problem but please reopen if the issue will still persist for some reasons
> Multiple servlet mapping does not work when resolving JAXRS URL
> ---------------------------------------------------------------
>
> Key: CXF-4471
> URL: https://issues.apache.org/jira/browse/CXF-4471
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.5.4
> Environment: jdk 1.6
> Reporter: Andy Yeung
> Priority: Minor
>
> If I define multiple servlet mapping for the CXF Servlet like below
> <servlet-mapping>
> <servlet-name>cxf</servlet-name>
> <url-pattern>/service/*</url-pattern>
> </servlet-mapping>
> <servlet-mapping>
> <servlet-name>cxf</servlet-name>
> <url-pattern>/ws/*</url-pattern>
> </servlet-mapping>
> At HttpUtils.getBaseAddress
> getEndpointAddress always used the first URL which was called and recorded.
> which may not matched the rawpath prefix which use another servlet mapping.
> If the First call to a JAXRS service is
> http://127.0.0.1:8080/test/service/path
> Then if I call http://127.0.0.1:8080/test/ws/path
> getEndpointAddress return http://127.0.0.1:8080/test/service/ rather than http://127.0.0.1:8080/test/ws/
> This causes the engine failed to resolve the JAXRS service using another url.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira