dev@jsr311.java.net

Re: JSR311: expanded regexp and subresource locators

From: Stephan Koops <Stephan.Koops_at_web.de>
Date: Mon, 14 Jul 2008 16:09:36 +0200

Hi,

Marc Hadley schrieb:
>> @Path("{foo:.*}")
>> public Object find(@PathParam("foo") String foo)
>> {
>> return new Bar();
>> }
>>
>> Let's say the HTTP request is:
>>
>> GET /a/bunch/of/stuff/a/b/c
>>
>> @PathParam foo would always eat up the whole URI.
>>
>> This is yet another thing I dislike about dynamic Subresource locators.
> I don't think this is a problem with sub-resource locators per-se, its
> just an issue of being careful with your @Path values. That will apply
> in spades if we allow specification of the regex for a path param.
I think it would be good, if there is an easy-to-use solution, that the
"/" is perhaps a special character. But I have no solution in mind.
There should be a explicitly hint according to this is the @Path javadoc.

best regards
   Stephan