Hey Jerome,
We're currently using beta 20. Since I sent the message, I've made a little
progress, turns out instead of handling "http://localhost/blah", it was
expecting just "/blah" in the URI.
However, hit another roadblock. When I set up an application to be inside a
container (as was necessary in b20) thusly:
Application app = new Application(new Context()){
public Restlet createRoot()
{
String documentRoot = "file:///tmp";
Directory dir = new Directory(getContext(), documentRoot){
public void handle(Request request, Response response) {
System.out.println("APP: Got called");
super.handle(request,response);
}
};
dir.setNegotiateContent(true);
return dir;
}
};
Container con= new Container();
con.getServers().add(Protocol.HTTP,TEST_PORT);
con.getClients().add(Protocol.FILE);
con.getDefaultHost().attach("",app);
con.start();
And then try to access it Thusly:
Request request = new Request(Method.GET, "/blah");
Response response = new Response(request);
con.handle(request, response);
The overridden handle function in the Application never gets called, as nothing
shows up on STDOUT. Am I setting this up wrong, or was this a bug that was
fixed in a later release?