【发布时间】:2012-01-07 23:01:14
【问题描述】:
我目前正在使用 Lift 重新实现一些项目。所有旧视图都是使用jade 和express.js 完成的,我很高兴看到Scalate 似乎也能处理它。
看起来并不像听起来那么容易。添加行后
(new ScalateView).register
根据我找到的任何来源,更改视图文件应该可以工作。但是当我尝试打开http://localhost:8080/ 时,我收到一个错误“在此服务器上找不到请求的 URL /”。
控制台日志告诉我他们正在搜索文件index.ssp 和index.scaml。但当然,只有index.jade。我想可能是scalate的版本太旧,所以我换了我的build.sbt:
name := "project"
version := "0.0.1"
scalaVersion := "2.9.1"
seq(webSettings: _*)
libraryDependencies ++= {
val liftVersion = "2.4-M5"
Seq(
"net.liftweb" %% "lift-webkit" % liftVersion % "compile->default",
"net.liftweb" %% "lift-mongodb" % liftVersion % "compile->default",
"net.liftweb" %% "lift-mongodb-record" % liftVersion % "compile->default",
"net.liftweb" %% "lift-wizard" % liftVersion % "compile->default",
"net.liftweb" %% "lift-scalate" % liftVersion % "compile->default",
"org.fusesource.scalate" % "scalate-core" % "1.5.3" % "compile->default"
)
}
libraryDependencies ++= Seq(
"junit" % "junit" % "4.5" % "test->default",
"org.eclipse.jetty" % "jetty-webapp" % "8.0.4.v20111024" % "container",
"javax.servlet" % "servlet-api" % "2.5" % "provided->default",
"ch.qos.logback" % "logback-classic" % "0.9.26" % "compile->default"
)
但这仍然是同样的问题。
什么是未记录的魔术?
【问题讨论】: