dev@glassfish.java.net

Re: REST API and slashes in resource names

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 31 May 2010 09:19:11 +0200

Hi Jason,

I over looked one aspect triggered in a previous email that Ludo sent.
Why does the JNDI identifier need to be encoded at all?

Ludo said he tried using @Path("domain{path: .*}") (probably better to
use @Path("domain{path: .+}") but ran into some issues. It might be
worthwhile investigating what those issues were.

I tried to look at the link you sent but it has expired or been
deleted. So i do not know how you are doing the encoding and decoding.
If not doing so already Jersey has it's own class that you can re-used
for such purposes:

   https://jersey.dev.java.net/nonav/apidocs/latest/jersey/com/sun/jersey/api/uri/UriComponent.html

Paul.


On May 29, 2010, at 3:29 AM, Jason Lee wrote:

> On 5/28/10 4:41 PM, Bill Shannon wrote:
>> I meant &slash; or whatever the html equivalent is.
> Oh. OK. I think Ken's right that that would pose problems as well,
> since & means something already in URLs.
>> It's kind of ugly, but it was created for a similar purpose.
>> Read the RFC for details:
>> http://tools.ietf.org/html/rfc3501#section-5.1.3
>
>> No git, hg is the way of the future! :-)
> I'd say I look forward to the religious debate, but I think that
> decision for GF has already been made by people above my pay grade. :P
>> I don't see how "{jndi/foo}" solves the original problem.
>> Doesn't that just look like two elements in the URL name -
>> "{jndi" and "foo}"?
> That's a good point, though me still be able to manage, as it seems
> Jersey uses a regex to match resource identifiers in the URL.
>
> Nevertheless, I'm mostly happy with the double encoding approach
> (see diff here: http://pastebin.com/da5hRJTD). If there are no
> complaints, I'll commit this change and press forward with this
> approach.
>
> --
> Jason Lee
> Senior Member of Technical Staff
> GlassFish Administration Console
>
> Oracle Corporation
> Phone x31197/+1 405-343-1964
> Blog http://blogs.steeplesoft.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>