I've just started looking at the Restlets project, since RC1, and I
can't seem to get a simple example working. It looks like it was broken
in RC1 with changeset 1267 regarding quoting of regex characters in
Template. I basically copy and pasted the 'trace' example from the
tutorial, but tried to attach a regex pattern for the URI so it would
match any character, but when hitting the URL, I'm getting back a 404.
I've traced it down to org.restlet.util.Template where getRegexPattern()
is invoked. It's quoting the "special" regex characters, but that seems
to be building the wrong regex pattern, especially for character sets.
In short, I see examples that show you can attach a Restlet to a Router
using "/[a-z]+", but that didn't work for RC1 or RC2. Is that not
supposed to work now? Is there a different way to do this?
- Router URI template (regex) Valdis Rigdon
-