【发布时间】:2016-01-29 15:12:22
【问题描述】:
我想将静态内容放入基于 restlet 的 Web 服务中。静态部分必须驻留在服务的 jar 中。我使用的代码是:
Directory directory = new Directory(getContext(), "clap://class/pageData");
router.attach("/page", directory);
如果我使用.../page/index.html 访问该服务,该页面将显示在浏览器中。但是调用.../page 或.../page/ 会导致“未找到”错误页面。
如何将 index.html 设为默认文件?
【问题讨论】:
标签: restlet