3 Replies Latest reply: Jul 5, 2011 8:44 PM by jtahlborn RSS

    Restlet Error "The server has not found anything matching the request URI"

      I want to serve some static html pages along with my restlet services from the same app ( running in Tomcat )
      Here is my web.xml
      <?xml version="1.0" encoding="UTF-8"?>  
      <web-app id="WebApp_ID" version="2.4"  
         <display-name>first steps servlet</display-name>  
         <!-- Application class name -->  
         <!-- Restlet adapter -->  
         <!-- Catch all requests -->  
      Here is my Application router class
      public class FirstStepsApplication extends Application
           public synchronized Restlet createInboundRoot()
                Router router = new Router(getContext());
                // Defines only one route
                router.attach("/hello", HelloWorldResource.class);
                router.attach("/login", LoginResource.class);
                router.attach("/", BasicResource.class);
                return router;
      I've gone back to the basic first steps example.
      It works fine if the url pattern is <url-pattern>/*</url-pattern>
      localhost/rest/login returns a string from my LoginResource, same too for /hello
      However a static html page I have /Mypage.html does not get returned when I enter the URL /MyPage.html
      However, if I then modify the url pattern to be
      and then enter the url /MyPage.html I will get the html page.
      But ...... I get the error "The server has not found anything matching the request URI" when I enter the url /login which worked ok the first case.

      What must I do in order for both Restlet & Static HTML resources to work together?

      Thanks ... J