I am currently re-implementing some project using Lift. All the old views were done using jade
for express.js
, and I was glad to read that Scalate seems to be able to handle it as well.
It's not as easy as it sounds, it seems. After adding the line
(new ScalateView).register
and changing the view files, it should work, according to any source I found. But when I try to open the http://localhost:8080/
, I get an error "The Requested URL / was not found on this server".
The console logs tell me they were searching the files index.ssp
and index.scaml
. But there is, of course, only an index.jade
. I thought it could be that the version of scalate
was too old, so I changed my 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"
)
But it's still the same problem.
What is the undocumented magic trick to get this working?