[ 
https://issues.apache.org/jira/browse/CXF-1925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12650170#action_12650170
 ] 

Sergey Beryozkin commented on CXF-1925:
---------------------------------------

In 2.2-SNAPSHOT/2.1.4-SNAPSHOT, HttpServletRequest Request URI is used, as 
opposed to PathInfo used.

With CXFServlet using "/*", Request URI and PathInfo are equal, but with 
CXFServlet using more restricting patterns like "/jaxrs/*" they would be 
different.

The reason it was done is to be able to handle encoded URIs, as PathInfo 
already contains a decoded value and it was causing CXF JAXRS failing to handle 
encoded URIs.

I did a quick test yesterday and it all should work as long as you root 
resource class's PATH gets updated

For ex if  CXFServlet uses "/jaxrs/*" and jaxrs:server uses "/bookstore", then 
root resource class should have

@Path("/jaxrs/bookstore") 

for requests like 

GET /jaxrs/bookstore or GET /jaxrs/bookstore/books handled correctly

Can  you update your root resource class and see if things are still working 
for you ?

I might consider adding an attribute to a jaxrs:server  to tell the runtime to 
use PathInfo only when selecting root resource classes. is it something  you 
would like us to do ? It might provide that extra encapsulation layer in cases 
when it's desirable to keep any changes to web.xml away from the code...



> Problem with servelt mappin on 2.2-SNAPSHOT
> -------------------------------------------
>
>                 Key: CXF-1925
>                 URL: https://issues.apache.org/jira/browse/CXF-1925
>             Project: CXF
>          Issue Type: Bug
>          Components: Configuration, REST
>    Affects Versions: 2.2
>            Reporter: Roelof
>
> When running a jax-rs REST service with the 2.2-snapshot release there is a 
> problem when CXFServlet maps to somthing else then /*. I tried:
> /servlet-mapping-path/bean-config-path/service-path. 
> This works fine under 2.1.3. But version 2.2-snapshot. returns a "no 
> operation defined" for this settup.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to