Hello,
I'm using a Directory with a WAR reference, and I get an NPE if the resource
doesn't exist *and* contains a forward slash. I would expect a 404 result
instead. If there's no forward slash in the URL, I get the 404 result as
expected. I assume this is related to directory searching.
Let me know if you need any more info to recreate. Also, I think it would be
helpful to list the war:/// syntax in the javadoc for
org.restlet.data.LocalReference.
thanks,
Jason
Here's a pared down version of my Application.createRoot() method... hopefully
I didn't cut out anything important.
public Restlet createRoot() {
Router router = new Router(getContext());
/*
* For everything else, look for the file in the WAR file.
The URI "war:///" resolves
* to the WebContent directory.
*/
Directory fileDirectory = new Directory(getContext(), new
LocalReference("war:///"));
fileDirectory.setListingAllowed(true);
router.attachDefault(fileDirectory);
return router;
}