Hi Leigh,
This is the right approach. You might want to use TYPE_URI_ALL instead
to make sure you match any remaining character. TYPE_URI_QUERY is a bit
more restrictive. See URI RFC for details on matched characters:
http://www.ietf.org/rfc/rfc2396.txt
Best regards,
Jerome
Klotz, Leigh a écrit :
Is this it?
Route uriRoute = router.attach("/users/{username}/tags/{Name}",
TagResource.class);
Route r = router.attach("/users/{username}/tags/{Name}/{args}",
TagResource.class);
r.getTemplate().getVariables().put("args", new
Variable(Variable.TYPE_URI_QUERY));
-----Original Message-----
From: Klotz, Leigh
Sent: Monday, June 11, 2007 4:02 PM
To: '[email protected]'
Subject: Route templates and path info
Is there a way to use a Template in a route that both matches an initial
pattern and provides the Resource the ability the Path Info from the
Request?
For example,
Route uriRoute = router.attach("/users/{username}/tags/{Name}",
TagResource.class);
/users/fred/tags/abcdef/more/stuff
Class TagResource {
..
String pathInfo = request.getPathInfo(); // ==> "/more/stuff"
I've read
http://www.restlet.org/documentation/1.0/tutorial#part11
and not seen the answer there.
Thank you,
Leigh.