Hello Alex,

I have a question : why do you need to route your admin application to "/admin/"? Is it because you notice that another URIs such as "/adminblahblah", are routed to your application too?
If so, you can specify the way this route must match the URIs :

Route route = router.attach("/admin/", new AdminApplication(...));
route.getTemplate().setMatchingMode(Template.MODE_EQUALS)

By doing so, an exact match is required (the default routing mode is Template.MODE_START_WITH).

I hope this will help you,
Thierry Boileau
I add my admin application to a router at the URL "/admin/' via an attach call:

router.attach("/admin/", new AdminApplication(...));

and inside that admin applicaiton I build another router.  If that router
uses a slash (/) at the start of the paths, it won't route properly. The fix is
easy and makes sense in that if I want:

  /admin/user/{user}

to route inside the AdminApplication restlet, the remaining part is
"user/{user}".

The problem is that if I want to re-use these components, the router
at the root would have to be "/user/{user}".

What's the right thing to do here?   Should I always setup my routing
paths without a trailing slash so that I can re-use objects that contain
routers that start with a slash?

--Alex Milowski

Reply via email to