Hello Marc-Elian,
Do you have declared the required client connectors
(http://www.restlet.org/documentation/1.1/api/org/restlet/Redirector.html#MODE_DISPATCHER)?
In such mode, the redirector becomes a client, gets the response ant
sends it back to its own client.
In the following sample code, requests are redirected to
http://www.restlet.org, which means that the component needs to add the
HTTP protocol to its list of supported client protocols.
Component component = new Component();
component.getServers().add(Protocol.HTTP, 8182);
component.getClients().add(Protocol.HTTP); // mandatory
component.getDefaultHost().attachDefault(
new Redirector(component.getContext(),
"http://www.restlet.org",
Redirector.MODE_DISPATCHER));
Best regards,
Thierry Boileau
Hi,
While having a lot of fun using Restlet, I'm looking for a Redirector example
using Redirector.MODE_DISPATCHER. It works well for client redirect, but I
can't get the mode dispatcher to work.
Thanks,
Meb