users@jsr311.java.net

Re: PathSegment question

From: Sergey Beryozkin <sergey.beryozkin_at_progress.com>
Date: Mon, 1 Dec 2008 16:46:25 -0000

Super, thanks very much

> On Dec 1, 2008, at 5:43 AM, Sergey Beryozkin wrote:
>>
>> If we have say a request URI "/bar" then should
>> PathSegment.getPath return "bar" or "/bar" ?
>>
> "bar"
>
>> Or, similarly, if we have "/" then should it be "" or "/" ? The
>> latter seems right so should it be "/bar" for PathSegment.getPath
>> for "/bar" URI ?
>>
> It should be "".
>
>> PathSegment JavaDocs do not give any examples hence I'm asking here,
>> I'd go for "/bar" for PathSegment.getPath without troubling the
>> list, but it seems somewhat inconsistent with how @PathParam
>> presents the values captured by default regular expressions (that
>> is, without the '/') - hence I'd like to clarify
>>
> No problem. There shouldn't be a leading '/' in either case.
>
> Marc.
>
> ---
> Marc Hadley <marc.hadley at sun.com>
> CTO Office, Sun Microsystems.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: users-help_at_jsr311.dev.java.net
>
>