Hi Jerome,

I added this line

host.getAllowedNames().add("localhost");


and now my url

localhost:8182/something          works

but

127.0.0.1:8182/something          doesn't work


Using getDefaultHost() and then attaching the target works fine in
both the cases.


And when I do

VirtualHost host = VirtualHost.createLocalHost(container.getContext());
       host.attach("/something", new Restlet() {
           protected void handleGet(Request request, Response response) {
               response.setEntity("Hello World!", MediaType.TEXT_PLAIN);
           }
       });
       container.setDefaultHost(host);

everything works fine too ...

Could you answer: why didn't the first one work for the 127.0.0.1 url?

I seem to be missing piece(s) in this jigsaw.

Cheers
Piyush

Reply via email to