Permalink
Browse files

Regenerated from scalatra-sbt.g8.

  • Loading branch information...
1 parent 67babee commit 73947eba67e5385cbda0d428c47a218d1d54cc19 @rossabaker rossabaker committed Mar 16, 2012
Showing with 24 additions and 24 deletions.
  1. +1 −1 build.sbt
  2. +8 −0 src/main/scala/Scalatra.scala
  3. +15 −23 src/main/webapp/WEB-INF/web.xml
View
@@ -13,7 +13,7 @@ libraryDependencies ++= Seq(
"org.scalatra" %% "scalatra-scalate" % "2.0.4",
"org.scalatra" %% "scalatra-specs2" % "2.0.4" % "test",
"ch.qos.logback" % "logback-classic" % "1.0.0" % "runtime",
- "org.eclipse.jetty" % "jetty-webapp" % "7.5.4.v20111024" % "container",
+ "org.eclipse.jetty" % "jetty-webapp" % "7.6.0.v20120127" % "container",
"javax.servlet" % "servlet-api" % "2.5" % "provided"
)
@@ -0,0 +1,8 @@
+import com.example.app._
+import org.scalatra._
+
+class Scalatra extends LifeCycle {
+ override def init(context: ApplicationContext) {
+ context.mount(new MyScalatraServlet, "/*")
+ }
+}
@@ -1,26 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
-<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
-xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
- <servlet>
- <servlet-name>scalatra</servlet-name>
- <servlet-class>
- com.example.app.MyScalatraServlet
- </servlet-class>
- </servlet>
+<!DOCTYPE web-app
+PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
+"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
+ version="3.0">
- <servlet-mapping>
- <servlet-name>scalatra</servlet-name>
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
-
- <!-- Static Asset Serving Example -->
- <!--
- <servlet-mapping>
- <servlet-name>default</servlet-name>
- <url-pattern>/img/*</url-pattern>
- <url-pattern>/css/*</url-pattern>
- <url-pattern>/js/*</url-pattern>
- </servlet-mapping>
- -->
+ <!--
+ This listener loads a class in the default package called Scalatra.
+ That class should should implement org.scalatra.LifeCycle. Your app
+ can be configured in Scala code there.
+ -->
+ <listener>
+ <listener-class>org.scalatra.servlet.ScalatraListener</listener-class>
+ </listener>
</web-app>

0 comments on commit 73947eb

Please sign in to comment.