--- a/src/main/scala/Main.scala Mon Aug 22 10:52:48 2011 -0400
+++ b/src/main/scala/Main.scala Mon Aug 22 11:49:39 2011 -0400
@@ -2,8 +2,10 @@
import unfiltered.request._
import unfiltered.response._
+import unfiltered.scalate._
+import unfiltered.jetty._
-import unfiltered.scalate._
+import java.io.File
object VirtualTrainerApp {
@@ -17,7 +19,11 @@
case req @ Path(Seg("test" :: Nil)) => Ok ~> Scalate(req, "geolocation.ssp")
}
- unfiltered.jetty.Http(2719).filter(test).filter(echo).run()
+ unfiltered.jetty.Http(2719).context("/scripts"){ ctx:ContextBuilder =>
+ ctx.resources(new File("src/main/resources/scripts").toURI.toURL)
+ }.context("/styles"){ ctx:ContextBuilder =>
+ ctx.resources(new File("src/main/resources/styles").toURI.toURL)
+ }.filter(test).filter(echo).run()
}