Hi KC, I think you are encountering the same issue as Jean-Yves. Take a look at Rob's reply for a solution: http://restlet.tigris.org/servlets/ReadMsg?list=discuss <http://restlet.tigris.org/servlets/ReadMsg?list=discuss&&msgNo=5234> &&msgNo=5234 In your case, you need to add a FILE client to your component. I hope to have a more declarative way to achieve the same result in the future.
Best regards, Jerome _____ De : KC ESL [mailto:[EMAIL PROTECTED] Envoye : mardi 20 mai 2008 09:56 A : [email protected] Objet : Directory not working in Tomcat / Jetty Servlet? Hi, I just started experimenting with Restlet and could not get Directory to work on Tomcat 5.5 or Jetty 6.1. I always get 404 returned. I've tried both Restlet 1.0.9 and yesterday's trunk. It worked ok as an application using the embedded Simple 3.1 though. The problem can be reproduced by modifying TestServletApplication.java included within src\org.restlet.example\org\restlet\example\dist\testServlet.zip, adding after: public Restlet createRoot() { if (true) return new Directory(getContext(), " file:///c:/restlet/docs/api/ <file://c:\restlet\docs\api\> "); Searching the mail archive, I found this in http://article.gmane.org/gmane.comp.java.restlet/4707 from James Horsley <james.horsley <at> gmail.com> who mentioned After some debugging I tracked my problem down to have "/*" as my servlet mapping which was causing HttpServletRequest.getServletPath() to return "". Restlet was using that result to determine what the base path was so ended up using the whole path " <http://localhost:1234/blah/56> http://localhost:1234/blah/56" when matching against the routes, so of course "/blah/{id}" isn't going to match. Could this be the same problem? What should the servlet-mapping value be set to? I also noticed that there were 2 warnings in the console log below, not sure if they are related to this problem. Cheers, KC. May 20, 2008 2:48:31 PM org.restlet.Connector <init> WARNING: The connector has been instantiated without any protocol. May 20, 2008 2:48:31 PM org.restlet.Connector <init> WARNING: The connector has been instantiated without any protocol. 2008-05-20 14:48:31.658:/rest:INFO: RestletServlet: [Noelios Restlet Engine] - Attaching application: [EMAIL PROTECTED] to URI: /rest May 20, 2008 2:48:31 PM com.noelios.restlet.local.DirectoryResource getVariants INFO: Getting variants for : file:///c:/restlet/docs/api/index <file://c:\restlet\docs\api\index> May 20, 2008 2:48:31 PM com.noelios.restlet.local.DirectoryResource <init> INFO: Converted target URI: file:///c:/restlet/docs/api/index <file://c:\restlet\docs\api\index> May 20, 2008 2:48:31 PM com.noelios.restlet.local.DirectoryResource <init> INFO: Converted base name : index May 20, 2008 2:48:31 PM com.noelios.restlet.LogFilter afterHandle INFO: 2008-05-20 14:48:31 192.168.1.108 - 192.168.1.108 8080 GET /rest/ - 404 330 - 31 http://m8:8080 <http://m8:8080/> Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14 -

