0

Hello I am having this problem where this code:

public class FirstStepsApplication extends Application {
    private static final String ROOT_URI = "/";
    @Override
    public Restlet createInboundRoot() {
        Router router = new Router(getContext());
        Directory rootDir = new Directory(getContext(), "war:///doc");
        rootDir.setIndexName("index.html");
        router.attach(ROOT_URI, rootDir);
        return router;
    }
}

Works in GAE localhost, when run with Maven: $mvn appengine:devserver

No problem. However when deployed it does not work anymore. I've checked the logs and all I can see is that access to /index.html return 404

quarks
  • 33,478
  • 73
  • 290
  • 513
  • Try changing the **ROOT_URI = ""; i.e. EMPTY STRING**. I have also faced some similar issue, also double check that in your appengine logs, how the appengine in creating and deploying your war file. – Ankur Jain Dec 18 '14 at 08:17
  • I also tried this and it still doesn't work – quarks Dec 18 '14 at 10:38

1 Answers1

1

I've recently added this "index.html" test

and it works as it should.

alesj
  • 418
  • 2
  • 5
  • Restlet works in Capedwarf for other Restlet target type, but I guess the issue is with the 'Directory' is trying to access static files which is restricted? – quarks Dec 18 '14 at 13:30
  • Here http://git.io/r34Jbg is the new Capedwarf restlet quickstart that I can't make to work. Perhaps if you have time you can try to deploy it and see if it really works – quarks Dec 18 '14 at 14:39