Hello,


I wonder if you set up properly the ROOT_URI variable (something like "file://....").
if you want to be sure, you can use the LocalReference#createFileReference method. It takes a directory path (something like "d:/temp/..." or "/tmp/...") as an argument.

That is to say:
return new Directory(getContext(), LocalReference.createFileReference("path to your directory"));


Best regards,
Thierry Boileau
--
Restlet ~ Core developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com


Hi

This code is in Restlet tutorial

// Create a component
Component component = new Component();
component.getServers().add(Protocol.HTTP, 8182);
component.getClients().add(Protocol.FILE);

// Create an application
Application application = new Application() {
    @Override
    public Restlet createRoot() {
        return new Directory(getContext(), ROOT_URI);
    }
};

// Attach the application to the component and start it
component.getDefaultHost().attach("", application);
component.start();

I can't have the navigated resource on my browser whatever the ROOT_URI
is, what is chances?
        

Reply via email to