Browse files

fix

  • Loading branch information...
1 parent 36af381 commit b14c7edaab6ad70a84021f4c4e5d85bb476f1aa0 @jlarmstrong jlarmstrong committed Feb 3, 2012
View
24 src/main/g8/src/main/scala/$package$/$servlet_name$.scala
@@ -0,0 +1,24 @@
+package $package$
+
+import org.scalatra._
+import scalate.ScalateSupport
+
+class $servlet_name$ extends ScalatraServlet with ScalateSupport {
+
+ get("/") {
+ <html>
+ <body>
+ <h1>Hello, world!</h1>
+ Say <a href="hello-scalate">hello to Scalate</a>.
+ </body>
+ </html>
+ }
+
+ notFound {
+ // Try to render a ScalateTemplate if no route matched
+ findTemplate(requestPath) map { path =>
+ contentType = "text/html"
+ layoutTemplate(path)
+ } orElse serveStaticResource() getOrElse resourceNotFound()
+ }
+}
View
0 src/main/g8/src/test/scala/$package$/empty
No changes.

0 comments on commit b14c7ed

Please sign in to comment.