users@jersey.java.net

[Jersey] Re: slash as special character in the URI

From: Colin Vipurs <zodiaczx6_at_gmail.com>
Date: Thu, 23 Jun 2011 15:06:23 +0100

If you're using tomcat then encoding or not will not fix this as it's
handled by the time it reaches Jersey.

http://tomcat.apache.org/tomcat-5.5-doc/config/systemprops.html

org.apache.tomcat.util.buf. UDecoder.ALLOW_ENCODED_SLASH
If this is true '%2F' and '%5C' will be permitted as path delimiters.
If not specified, the default value of false will be used.

You can disable this feature.

On Thu, Jun 23, 2011 at 2:47 PM, Martin Matula <martin.matula_at_oracle.com> wrote:
> I believe the encoded slash should work. How does your code look like? I.e.
> what are you using to extract the parameter from the URL?
> Martin
>
> On 21.6.2011 0:02, Rahul Babbar wrote:
>>
>> Hello Jersey world,
>>
>> I have some URIs of the form  /resource;param=value.
>>
>> It works fine, but if the value contains a '/', it does fail giving a 404
>> error resource not found.
>>
>> So, the following URI fails /resource;param=M/A.
>>
>> I tried using /resource;param=M%2FA but it also does not work.
>>
>> What should be done for pass the appropriate '/' in the parameter?
>>
>> Thank you
>>
>> Rahul
>



-- 
Maybe she awoke to see the roommate's boyfriend swinging from the
chandelier wearing a boar's head.
Something which you, I, and everyone else would call "Tuesday", of course.