Hi

I think this has been resolved in CXF 3.0.5-SNAPSHOT as part of
https://issues.apache.org/jira/browse/CXF-6302

CXF deals with supporting percent-encoded paths correctly but there was an issue when the JAX-RS endpoint address (in this case it would be derived from ApplicationPath) could not have %-encoded characters

Please try CXF 3.0.5-SNAPSHOT, and let me know if it is a still an issue...

Thanks, Sergey
On 29/04/15 05:21, ellen wrote:
Hi all,

When I learn jaxrs spec, I see it said in ApplicationPath doc:

public abstract java.lang.String value

Defines the base URI for all resource URIs. A trailing '/' character will be
automatically appended if one is not present.

The supplied value is automatically percent encoded to conform to the path
production of RFC 3986 section 3.3. *Note that percent encoded values are
allowed in the value, an implementation will recognize such values and will
not double encode the '%' character.*


But when I using this kind of path:

@ApplicationPath("ApplicationPath*%21*")
public class TSAppConfig extends Application {

public java.util.Set<java.lang.Class&lt;?>> getClasses()
{ Set<Class&lt;?>> resources = new HashSet<Class&lt;?>>();
resources.add(Resource.class); return resources; }


}

and Resource

@Path("/Resource")
public class Resource {
@GET
public Response returnOk(@Context UriInfo uriInfo)
{ return Response.ok(uriInfo.getAbsolutePath().toString()).build(); }

}


On tomcat, for get
/jaxrs_ee_applicationpath_web/ApplicationPath*!*/Resource/ HTTP/1.1, one
receive 404 page not found error.

I'm not sure if CXF support decode %?

Thanks a lot! :)



--
View this message in context: 
http://cxf.547215.n5.nabble.com/Does-CXF-support-percent-encoded-values-on-ApplicationPath-tp5756693.html
Sent from the cxf-user mailing list archive at Nabble.com.



--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Reply via email to