I have a question about using Protocol.FILEin this example from the Restlet site
public static final String ROOT_URI = "file:///c:/restlet/docs/api/";
[...]
Component component = new Component();
component.getServers().add(Protocol.HTTP, 8182);
component.getClients().add(Protocol.FILE);
Application application = new Application() {
@Override
public Restlet createInboundRoot() {
return new Directory(getContext(), ROOT_URI);
}
};
component.getDefaultHost().attach(application);
component.start();
Why is it necessary to add Protocol.FILEto the list of client connectors to serve the contents of a directory / file?
source
share