Hi,
I'm brand new to restlet, so excuse my ignorance ;)
I tried some sample code from the tutorial, namely the Directory resource.
I tried this:
Application app = new Application(getContext()) {
@Override
public Restlet createRoot() {
Directory directory = new Directory(getContext(),
localDir.toURI().toString());
directory.setListingAllowed(true);
return directory;
}
};
getDefaultHost().attach("/dir", app);
now, surfing to my server with URI /dir brings this surprising directory
listing:
rs/.DS_Store
rs/.Findbugs_prefs
rs/.GuitarPro
rs/.JMAppsCfg
rs/.Trash
rs/.Xauthority
rs/.aladin
rs/.asadminprefs
rs/.asadmintruststore
rs/.bash_history
etc.etc.
Notice the rs/ prefix, which is from the parent directory (which is
/Users/beders).
My guess is that maybe you try to remove the drive part and the colon
from the file URI, which, of course, isn't there on Mac systems :)
Just a wild guess of course ;)
Is anyone else having this problem?
Cheers,
Jochen