users@jsr311.java.net

Re: Converting URI templates to regular expressions in 0.9

From: Sergey Beryozkin <sergey.beryozkin_at_iona.com>
Date: Tue, 8 Jul 2008 19:08:42 +0100

To be precise, the first path expression in my test is "/bookstore" and another one is "/bookstore/{id}", and a request
"/bookstore/" matches the resource class with a "/bookstore" path but not the one with "/bookstore/{id}", with the former one
converted to "/bookstore(/.*)?" and the latter one converted to "/bookstore/(^/+?)(/.*)?".

This looks right to me...

Cheers, Sergey

----- Original Message -----
From: "Sergey Beryozkin" <sergey.beryozkin_at_iona.com>
To: <users_at_jsr311.dev.java.net>
Sent: Tuesday, July 08, 2008 6:37 PM
Subject: Converting URI templates to regular expressions in 0.9


Hi

I'd just like to clarify one thing. After converting URI templates to regular expressions as per the 0.9 spec,
I can see that, for ex, with the following two classes

@Path("{foo}")
class ResourceClassA {
}

@Path("{foo}/{bar}")
class ResourceClassB {
}

a /foo/ request

(note the trailing '/')

matches ResourceClassA as opposed to ResourceClassB.
I think it makes total sense - but I know that up to 0.9 this request matches ResourceClassB, due to (.*?) used to substitute
template variables...

Can someone confirm please that what I observe is indeed expected...

Thanks, Sergey



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

---------------------------------------------------------------------
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