Restlet代码在本地工作,但在部署时不工作(在Openshift上)

时间:2014-12-17 22:31:16

标签: java google-app-engine openshift restlet capedwarf

您好,我遇到此问题的代码:

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;
    }
}

使用Maven运行时,在GAE localhost中运行:$mvn appengine:devserver

没问题。但是在部署时它不再起作用。我已经检查了日志,所有我能看到的是访问/index.html返回404

1 个答案:

答案 0 :(得分:1)