Search code examples
javagoogle-app-engineopenshiftrestletcapedwarf

Restlet code works on local but not when deployed (on Openshift)


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


Solution

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

    and it works as it should.