dev@jsr311.java.net

Re: JSR311: Empty path segments and path params

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Tue, 12 Aug 2008 16:21:50 -0400

We did originally have a path param representing 0 or more chars and
switched to 1 or more to fix some edge cases where a sub-resource
method or locator would get called instead of a resource method when
the request URL ended in '/'. With the new support for regexs its easy
to switch to [^/]* if that's what the developer wants but I think the
current default more closely matches intuition.

Marc.

On Aug 12, 2008, at 3:12 PM, Bill Burke wrote:

> In the javadoc of @Path you state that a path param with no regex
> should be "[^/]+". I think it should be "[^/]*". Reason? Consider
> this:
>
> @Path("{1}/{2}/{3}")
>
> GET /;a=a/;b=b/;c=c
>
>
> For path param's 1-3 the path segment (excluding matrix parameters)
> is "" and the matching path could be "///".
>
> Bill
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: dev-help_at_jsr311.dev.java.net
>

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.