users@jersey.java.net

Re: [Jersey] character slash in path parameter

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 16 Nov 2009 09:20:22 +0100

Hi,


On Nov 13, 2009, at 8:58 PM, Hoan Vu Tran Ho wrote:

> Hi,
> I am using Jersey to code our new restful interface and facing now
> following problem: For example we have @Path("/element/{uid}") and
> if the uid = "AAA/BB" then the @Path doesn't work even if the client
> already uses URL encoding ( -> AAA2%FBB). Can you please tell me if
> that is a bug?
>

As Moises indicates the default matching is for a path segment.

What HTTP server/Web container are you using?

There are some bugs in certain Web containers that do not allow for
%2F encoded '/' characters in path segments and they will erroneously
take the step of automatically decoding them before invoking any
matching servlet.

In GlassFish/Grizzly there is a flag to disable this behavior but i
cannot remember what it is. You will need to ask on the GlassFish or
Grizzly users list.

Paul.