Re: JSR311: Question on

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Wed, 26 Mar 2008 11:06:57 -0400

On Mar 26, 2008, at 9:59 AM, Bill Burke wrote:
> if I have
> @Path(value="foo/{id}", limited=false)
> What is the value if {id} if the URI is "foo/bar/blah"?
> Is {id} "bar" or "bar/blah"? I'm guessing "bar/blah".

> IMO, I'd much rather see us move to regular expressions. I did look
> at the uri template spec, but it seemed more of a spec to create
> URIs rather than to extract parameters values from an existing one
> or an expression to match an existing URI. If you're understanding
> what I mean.
I think you're right that its aimed at folks creating URIs from
templates rather than matching URIs to template though I've brought up
the latter use case several times in discussions. That said I think
the syntax we have now is very clear and quite powerful already and
I'd rather not introduce new syntax that diverges from the template
spec until that is baked. It will be easy to add support for
additional syntax in the future if we stick with the very limited
stable subset we support now but if we start diverging in incompatible
ways we'll be stuck with whatever we come up with and limited in our
ability to track the standard should it ever emerge.


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