Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Initial commit.

  • Loading branch information...
commit 60cdeeb578a9d5a6b4c009591930d87675565a1a 0 parents
Ross A. Baker rossabaker authored
12 .gitignore
@@ -0,0 +1,12 @@
+*~
+lib_managed/
+project/boot/
+project/build/target/
+project/plugins/project/build.properties
+src_managed/
+target/
+*.eml
+*.iml
+*.ipr
+*.iws
+.*.sw?
27 README.md
@@ -0,0 +1,27 @@
+# Scalatra SBT prototype
+
+1. Clone this repository:
+
+ git clone git://github.com/scalatra/scalatra-sbt-prototype.git my-app
+
+2. Change directory into your clone:
+
+ cd my-app
+
+3. Launch [SBT](http://code.google.com/p/simple-build-tool).
+
+ sbt
+
+4. At SBT prompt, fetch the dependencies. Do this the first time and also whenever you change the project definition.
+
+ update
+
+5. Run Jetty
+
+ jetty
+
+6. Go to http://localhost:8080/.
+
+7. Learn more at http://www.scalatra.org/.
+
+8. Happy hacking!
8 project/build.properties
@@ -0,0 +1,8 @@
+#Project properties
+#Tue Aug 03 23:34:35 EDT 2010
+project.organization=com.example
+project.name=scalatra-sbt-prototype
+sbt.version=0.7.4
+project.version=0.1.0-SNAPSHOT
+build.scala.versions=2.8.0
+project.initialize=false
9 project/build/MyProject.scala
@@ -0,0 +1,9 @@
+import sbt._
+
+class MyProject(info: ProjectInfo) extends DefaultWebProject(info) {
+ val scalatra = "org.scalatra" %% "scalatra" % "2.0.0-SNAPSHOT"
+ val servletApi = "org.mortbay.jetty" % "servlet-api" % "2.5-20081211" % "provided"
+ val jetty6 = "org.mortbay.jetty" % "jetty" % "6.1.24" % "test"
+
+ val sonatypeNexusSnapshots = "Sonatype Nexus Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
+}
9 src/main/scala/MyScalatraFilter.scala
@@ -0,0 +1,9 @@
+package com.example
+
+import org.scalatra._
+
+class MyScalatraFilter extends ScalatraFilter {
+ get("/") {
+ <h1>Hello, world!</h1>
+ }
+}
18 src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:web="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+ <filter>
+ <filter-name>scalatra</filter-name>
+ <filter-class>
+ com.example.MyScalatraFilter
+ </filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>scalatra</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+</web-app>
Please sign in to comment.
Something went wrong with that request. Please try again.