我正在尝试基于 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
。