users@jsr311.java.net

Re: Matching requests to subresource methos

From: Sergey Beryozkin <sergey.beryozkin_at_iona.com>
Date: Fri, 7 Mar 2008 15:33:29 -0000

Hi,

> In 2.5.2.d you remove members for which the final matching group is
> not empty or '/'. So if the final matching group is '/' then you'd
> you'd leave it in.

Sorry, do you mean "remove the member" ? That is, in my example below, no match would be found for a

GET /bar/ ?

Thanks, Sergey


> On Mar 7, 2008, at 8:42 AM, Sergey Beryozkin wrote:
>>
>> I have few questions about matching requests to subresource methods.
>>
>> Consider this class :
>>
>> @Path("/")
>> class SomeClass {
>>
>> @GET
>> @Path("bar")
>> public Bar getBar() {}
>> }
>>
>> Is it correct that a "GET /bar/" request won't be bound to getBar() ?
>>
>> According to the 2.5 section, the trailing '/' in GET request will
>> end up in the final matching group, when matching it against
>> Path("bar"), and thus according to 2.5.2.d, getBar() won't be
>> included in the list of candidates...
>>
> In 2.5.2.d you remove members for which the final matching group is
> not empty or '/'. So if the final matching group is '/' then you'd
> you'd leave it in.
>
> Marc.
>
>
>>
>> Did I get it wrong ?
>>
>> Thanks, Sergey
>>
>>
>> ----------------------------
>> IONA Technologies PLC (registered in Ireland)
>> Registered Number: 171387
>> Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
>> Ireland
>
> ---
> 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

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland