【发布时间】:2011-07-19 06:42:14
【问题描述】:
我正在基于 scalatra-sbt.g8 尝试以下操作:
class FooWeb extends ScalatraServlet with ScalateSupport {
beforeAll { contentType = "text/html" }
get("/") {
templateEngine.layout("/WEB-INF/scalate/templates/hello-scalate.jade")
}
}
但我得到以下异常(即使文件存在) - 任何线索?
Could not load resource: [/WEB-INF/scalate/templates/hello-scalate.jade]; are you sure it's within [null]?
org.fusesource.scalate.util.ResourceNotFoundException: Could not load resource: [/WEB-INF/scalate/templates/hello-scalate.jade]; are you sure it's within [null]?
FWIW,最里面的异常来自 org.mortbay.jetty.handler.ContextHandler.getResource 第 1142 行:_baseResource==null。
【问题讨论】: