users@jsr311.java.net

Re: PathSegment question

From: Sergey Beryozkin <sergey.beryozkin_at_progress.com>
Date: Mon, 1 Dec 2008 10:43:27 -0000

Hi,

Another question.

If we have say a request URI "/bar" then should
PathSegment.getPath return "bar" or "/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 ?

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

Thanks, Sergey



> Hi,
>
> if we have say a URI ending with a forward slash '/bar/' then how many PathSegments a UriInfo.getPathSegments() should return ? I
> think it should be 2 - can someone confirm it please ?
>
> Thanks, Sergey
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: users-help_at_jsr311.dev.java.net
>
>