Hello, I've jsut downloaded Restlet and I'm trying to create a simple application that displays the contents of a directory. I have Tomcat running, I've created a war file which contains the 3 JARs that are said to be required in the tutorial [1], and the source code of my application is as follows:
public class Documents extends Application { public Restlet createRoot() { LocalReference ref = new LocalReference("file:///home/csaba/stuff/"); return new Directory(getContext(), ref); } } When I deploy the web application and open http://localhost:8080/resttest/hello.txt (a file that does exist in ~/stuff/) I get the following message: The server has not found anything matching the request URI I looked at the logs, and it seems that Restlet is resolving the URI correctly: to /home/csaba/stuff/hello.txt There are no errors in the logs. So why doesn't it display a text file's contents for me? Or if I just want to see the contents of the directory, then why doesn't that work either? Mind you, in the tutorial [2] it says that I should use the createInboundRoot() method. If I do that, then I get another error: The server encountered an unexpected condition which prevented it from fulfilling the request The log file says: INFO: A filter was executed without a next Restlet attached to it. I'm guessing this means I should use the createRoot() method. What to do? Thanks, Csaba 1 - http://www.restlet.org/documentation/1.1/firstSteps#part03 2 - http://www.restlet.org/documentation/2.0/tutorial#part06 ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2456534