|
Hello Bruno, I wonder if the Router#attachDefault can serve your purpose. The attached Resource or Restlet is invoked when no route matches. Best regards, Thierry Boileau -- Restlet ~ Core developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com Hi, I have a situation where it would be very useful if a router (a normal Restlet Router or the routing part of JAX-RS) could tell in its response whether there was a matching route.An example to clarify: I would like all requests to be handled by JAX-RS, and if there's no resource class to handle the request, move on to another router to handle the request. (it's not possible to decide on beforehand to what router to go, nor is the caller aware of what resources are available within each router) This is currently not possible, since what JAX-RS (or the normal Restlet router) does when there's no matching resource class or matching route is setting the response to 404. This is ok, but it doesn't allow to make the distinction between "no matching route" or "a route matched, but the addressed resource was not found". Any suggestions? Would this be something that could be considered for inclusion in Restlet? The solution I'm thinking of is that restlets which perform routing (= Router, JaxRsRestlet, possibly others) could set a special response attribute to indicate there was no matching route. |
- Router: 'not matched' versus 'not found' Bruno Dumon
- Re: Router: 'not matched' versus 'not found' Thierry Boileau
- Re: Router: 'not matched' versus 'not found' Bruno Dumon
- Re: Router: 'not matched' versus 'not found' Stephan Koops
- Re: Router: 'not matched' versus 'not found' Bruno Dumon
- RE: Router: 'not matched' versus 'not found' Jerome Louvel
- Re: Router: 'not matched' versus 'not fou... Stephan Koops
- Re: Router: 'not matched' versus 'no... Bruno Dumon
- Re: Router: 'not matched' versus... Stephan Koops
- Re: Router: 'not matched' ve... Bruno Dumon
- Re: Router: 'not matched' ve... Stephan Koops
- Re: Router: 'not matched' ve... Bruno Dumon

