Hi RK,
This is possible but you need to change the matching mode of the root router:
rootRouter.setDefaultMatchingMode(Template.MODE_STARTS_WITH);
rootRouter.attach("xyz/", xyzRouter);
rootRouter.attach("abc/", abcRouter);
Best regards,
Jerome
--
Restlet ~ Founder and Technical Lead ~ http://www.restlet.org
Noelios Technologies ~ http://www.noelios.com
-----Message d'origine-----
De : [email protected] [mailto:[email protected]]
Envoyé : samedi 25 décembre 2010 20:35
À : [email protected]
Objet : Is there a way to setup hierarchy of routers?
Hi,
We have been trying to use Restlet framework and having difficulty in
implementing a hierarchy of routers.
We want to have our server running listening with a route to our main
application gateway. For example anything that matches /myapp/mygateway/ is
received by my router. This router would have had additional routes routing the
incoming requests to corresponding components like /myapp/mygateway/xyz/ to
XyzRouter, /myapp/mygateway/abc/ to AbcRouter. XyzRouter and AbcRouter then
have complete URLs and the Resources that handles these URLs.
We tried to set this up with a hierarchy of routers, but our server is not able
to resolve the incoming requests unless the routes are added to the first
router in the server.
Any pointers on how to make this work? Is this possible or it cannot be done
this way with Restlet framework?
-RK.
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2693696
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2693927