├── .github ├── dependabot.yml └── workflows │ └── scala.yml ├── .gitignore ├── 2.3 ├── async │ ├── akka-examples │ │ ├── .gitignore │ │ ├── README.md │ │ ├── project │ │ │ ├── build.properties │ │ │ ├── build.scala │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ ├── logback.xml │ │ │ │ └── rebel.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── app │ │ │ │ │ ├── FutureController.scala │ │ │ │ │ └── MyActorApp.scala │ │ │ └── webapp │ │ │ │ └── WEB-INF │ │ │ │ ├── layouts │ │ │ │ └── default.scaml │ │ │ │ ├── views │ │ │ │ └── hello-scalate.scaml │ │ │ │ └── web.xml │ │ │ └── test │ │ │ └── scala │ │ │ └── com │ │ │ └── example │ │ │ └── app │ │ │ ├── FutureControllerSpec.scala │ │ │ └── MyActorAppSpec.scala │ ├── scalatra-atmosphere-embedded │ │ ├── .gitignore │ │ ├── README.md │ │ ├── project │ │ │ ├── build.properties │ │ │ ├── build.scala │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ ├── logback.xml │ │ │ │ └── rebel.xml │ │ │ ├── scala │ │ │ │ ├── JettyLauncher.scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ └── atmosphere │ │ │ │ │ └── ChatController.scala │ │ │ └── webapp │ │ │ │ ├── WEB-INF │ │ │ │ ├── layouts │ │ │ │ │ └── default.ssp │ │ │ │ ├── views │ │ │ │ │ └── index.ssp │ │ │ │ └── web.xml │ │ │ │ ├── css │ │ │ │ ├── bootstrap-responsive.css │ │ │ │ ├── bootstrap-responsive.min.css │ │ │ │ ├── bootstrap-theme.min.css │ │ │ │ ├── bootstrap.css │ │ │ │ └── bootstrap.min.css │ │ │ │ ├── img │ │ │ │ ├── glyphicons-halflings-white.png │ │ │ │ └── glyphicons-halflings.png │ │ │ │ └── js │ │ │ │ ├── application.js │ │ │ │ ├── bootstrap.js │ │ │ │ ├── bootstrap.min.js │ │ │ │ ├── html5shiv.js │ │ │ │ ├── jquery-1.9.0.js │ │ │ │ ├── jquery-atmosphere.js │ │ │ │ ├── jquery.atmosphere.js │ │ │ │ └── respond.min.js │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── atmosphere-example │ │ │ └── ChatControllerSpec.scala │ └── scalatra-atmosphere-example │ │ ├── .gitignore │ │ ├── README.md │ │ ├── project │ │ ├── build.properties │ │ ├── build.scala │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ ├── logback.xml │ │ │ └── rebel.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ └── atmosphere │ │ │ │ └── ChatController.scala │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── layouts │ │ │ │ └── default.ssp │ │ │ ├── views │ │ │ │ └── index.ssp │ │ │ └── web.xml │ │ │ ├── css │ │ │ ├── bootstrap-responsive.css │ │ │ ├── bootstrap-responsive.min.css │ │ │ ├── bootstrap-theme.min.css │ │ │ ├── bootstrap.css │ │ │ └── bootstrap.min.css │ │ │ ├── img │ │ │ ├── glyphicons-halflings-white.png │ │ │ └── glyphicons-halflings.png │ │ │ └── js │ │ │ ├── application.js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ ├── html5shiv.js │ │ │ ├── jquery-1.9.0.js │ │ │ ├── jquery-atmosphere.js │ │ │ ├── jquery.atmosphere.js │ │ │ └── respond.min.js │ │ └── test │ │ └── scala │ │ └── org │ │ └── scalatra │ │ └── atmosphere-example │ │ └── ChatControllerSpec.scala ├── deployment │ ├── scalatra-heroku │ │ ├── .gitignore │ │ ├── Procfile │ │ ├── README.md │ │ ├── project │ │ │ ├── build.properties │ │ │ ├── build.scala │ │ │ └── plugins.sbt │ │ ├── sbt │ │ ├── src │ │ │ ├── main │ │ │ │ ├── resources │ │ │ │ │ └── logback.xml │ │ │ │ ├── scala │ │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ │ └── org │ │ │ │ │ │ └── scalatra │ │ │ │ │ │ ├── JettyLauncher.scala │ │ │ │ │ │ └── example │ │ │ │ │ │ ├── HerokuApp.scala │ │ │ │ │ │ └── HerokuExampleStack.scala │ │ │ │ └── webapp │ │ │ │ │ └── WEB-INF │ │ │ │ │ ├── templates │ │ │ │ │ ├── layouts │ │ │ │ │ │ └── default.jade │ │ │ │ │ └── views │ │ │ │ │ │ └── hello-scalate.jade │ │ │ │ │ └── web.xml │ │ │ └── test │ │ │ │ └── scala │ │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ └── HerokuAppSpec.scala │ │ └── system.properties │ └── scalatra-jelastic │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ ├── build.scala │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ └── main │ │ ├── scala │ │ ├── JelasticApp.scala │ │ └── ScalatraBootstrap.scala │ │ └── webapp │ │ └── WEB-INF │ │ └── web.xml ├── formats │ └── scalatra-commands │ │ ├── .gitignore │ │ ├── README.md │ │ ├── project │ │ ├── build.properties │ │ ├── build.scala │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ ├── logback.xml │ │ │ └── rebel.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ └── databinding │ │ │ │ ├── TodosController.scala │ │ │ │ ├── commands │ │ │ │ └── TodoCommands.scala │ │ │ │ ├── data │ │ │ │ └── TodoData.scala │ │ │ │ ├── models │ │ │ │ └── Models.scala │ │ │ │ └── utils │ │ │ │ └── Logger.scala │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── layouts │ │ │ │ └── default.ssp │ │ │ ├── views │ │ │ │ └── todos │ │ │ │ │ └── index.ssp │ │ │ └── web.xml │ │ │ ├── css │ │ │ ├── bootstrap-responsive.css │ │ │ ├── bootstrap-responsive.min.css │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.min.css │ │ │ └── todo.css │ │ │ ├── img │ │ │ ├── glyphicons-halflings-white.png │ │ │ └── glyphicons-halflings.png │ │ │ └── js │ │ │ ├── bootstrap.js │ │ │ └── bootstrap.min.js │ │ └── test │ │ └── scala │ │ └── com │ │ └── futurechimps │ │ └── example │ │ └── databindings │ │ └── TodosControllerSpec.scala ├── http │ ├── authentication-demo │ │ ├── .gitignore │ │ ├── README.md │ │ ├── project │ │ │ ├── build.properties │ │ │ ├── build.scala │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ ├── logback.xml │ │ │ │ └── rebel.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ ├── AuthDemo.scala │ │ │ │ │ └── AuthenticationSupport.scala │ │ │ └── webapp │ │ │ │ └── WEB-INF │ │ │ │ ├── layouts │ │ │ │ └── default.scaml │ │ │ │ ├── views │ │ │ │ └── hello-scalate.scaml │ │ │ │ └── web.xml │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── AuthDemoSpec.scala │ ├── scalatra-gzip │ │ ├── .gitignore │ │ ├── README.md │ │ ├── project │ │ │ ├── build.properties │ │ │ ├── build.scala │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ └── main │ │ │ ├── scala │ │ │ ├── GZipApp.scala │ │ │ └── ScalatraBootstrap.scala │ │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── web.xml │ ├── scalatra-http-client │ │ ├── .gitignore │ │ ├── README.md │ │ ├── project │ │ │ ├── build.properties │ │ │ ├── build.scala │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ └── main │ │ │ ├── scala │ │ │ ├── DispatchApp.scala │ │ │ └── ScalatraBootstrap.scala │ │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── web.xml │ ├── scalatra-http-demo │ │ ├── .gitignore │ │ ├── README.md │ │ ├── project │ │ │ ├── build.properties │ │ │ ├── build.scala │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ ├── CookiesExample.scala │ │ │ │ │ ├── FileUploadExample.scala │ │ │ │ │ ├── FilterExample.scala │ │ │ │ │ └── HttpExample.scala │ │ │ └── webapp │ │ │ │ ├── WEB-INF │ │ │ │ ├── templates │ │ │ │ │ ├── layouts │ │ │ │ │ │ └── default.jade │ │ │ │ │ └── views │ │ │ │ │ │ └── hello-scalate.jade │ │ │ │ └── web.xml │ │ │ │ └── assets │ │ │ │ ├── css │ │ │ │ ├── bootstrap-responsive.css │ │ │ │ ├── bootstrap-responsive.min.css │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.min.css │ │ │ │ ├── scalatra.css │ │ │ │ └── syntax.css │ │ │ │ ├── img │ │ │ │ ├── back_pattern.png │ │ │ │ ├── glyphicons-halflings-white.png │ │ │ │ ├── glyphicons-halflings.png │ │ │ │ ├── logo-s.png │ │ │ │ ├── logo-x.png │ │ │ │ ├── scalatra_logo.png │ │ │ │ └── skeletal_weave.png │ │ │ │ └── js │ │ │ │ ├── bootstrap.js │ │ │ │ ├── bootstrap.min.js │ │ │ │ └── jquery.min.js │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── HttpExampleSpec.scala │ └── scentry-auth-demo │ │ ├── .gitignore │ │ ├── README.md │ │ ├── project │ │ ├── build.properties │ │ ├── build.scala │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ └── logback.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── com │ │ │ │ └── constructiveproof │ │ │ │ └── example │ │ │ │ ├── ProtectedController.scala │ │ │ │ ├── ScentryauthdemoStack.scala │ │ │ │ ├── SessionsController.scala │ │ │ │ ├── auth │ │ │ │ ├── AuthenticationSupport.scala │ │ │ │ └── strategies │ │ │ │ │ ├── RememberMeStrategy.scala │ │ │ │ │ └── UserPasswordStrategy.scala │ │ │ │ └── models │ │ │ │ └── User.scala │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── templates │ │ │ ├── layouts │ │ │ │ └── default.ssp │ │ │ └── views │ │ │ │ └── sessions │ │ │ │ └── new.ssp │ │ │ └── web.xml │ │ └── test │ │ └── scala │ │ └── com │ │ └── constructiveproof │ │ └── example │ │ └── ProtectedServletSpec.scala ├── persistence │ ├── riak-example │ │ ├── .gitignore │ │ ├── README.md │ │ ├── project │ │ │ ├── build.properties │ │ │ ├── build.scala │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ ├── RiakExampleStack.scala │ │ │ │ │ ├── RiakSupport.scala │ │ │ │ │ └── SimpleRiakController.scala │ │ │ └── webapp │ │ │ │ └── WEB-INF │ │ │ │ ├── templates │ │ │ │ ├── layouts │ │ │ │ │ └── default.jade │ │ │ │ └── views │ │ │ │ │ └── hello-scalate.jade │ │ │ │ └── web.xml │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── RiakControllerTest.scala │ ├── scalatra-casbah-example │ │ ├── .gitignore │ │ ├── README.md │ │ ├── project │ │ │ ├── build.properties │ │ │ ├── build.scala │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ ├── MongoController.scala │ │ │ │ │ ├── ScalatraCasbahExampleStack.scala │ │ │ │ │ └── json_conversion.scala │ │ │ └── webapp │ │ │ │ └── WEB-INF │ │ │ │ ├── templates │ │ │ │ ├── layouts │ │ │ │ │ └── default.jade │ │ │ │ └── views │ │ │ │ │ └── hello-scalate.jade │ │ │ │ └── web.xml │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── MongoControllerSpec.scala │ ├── scalatra-slick │ │ ├── .gitignore │ │ ├── .project │ │ ├── README.md │ │ ├── project │ │ │ ├── build.properties │ │ │ ├── build.scala │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ └── main │ │ │ ├── resources │ │ │ ├── c3p0.properties │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── slicksupport │ │ │ │ └── slick.scala │ │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── web.xml │ └── scalatra-squeryl │ │ ├── .gitignore │ │ ├── README.md │ │ ├── project │ │ ├── build.properties │ │ ├── build.scala │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ └── logback.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ ├── ArticlesController.scala │ │ │ │ ├── init │ │ │ │ ├── DatabaseInit.scala │ │ │ │ └── DatabaseSessionSupport.scala │ │ │ │ └── models │ │ │ │ └── BlogDb.scala │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── layouts │ │ │ │ └── default.ssp │ │ │ ├── views │ │ │ │ └── articles │ │ │ │ │ ├── index.ssp │ │ │ │ │ └── new.ssp │ │ │ └── web.xml │ │ │ ├── css │ │ │ ├── bootstrap-responsive.css │ │ │ ├── bootstrap-responsive.min.css │ │ │ ├── bootstrap.css │ │ │ └── bootstrap.min.css │ │ │ ├── favicon.ico │ │ │ ├── img │ │ │ ├── glyphicons-halflings-white.png │ │ │ └── glyphicons-halflings.png │ │ │ └── js │ │ │ ├── angular-1.0.1.js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ └── jquery.min.js │ │ └── test │ │ └── scala │ │ └── org │ │ └── scalatra │ │ └── example │ │ └── ArticlesControllerSpec.scala ├── resources │ ├── scalatra-coffeescript │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ ├── build.scala │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ └── main │ │ │ ├── scala │ │ │ ├── CoffeeScriptApp.scala │ │ │ └── ScalatraBootstrap.scala │ │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── web.xml │ │ │ ├── wro.properties │ │ │ └── wro.xml │ │ │ └── coffee │ │ │ └── main.coffee │ └── scalatra-less-css │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ ├── build.scala │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ └── main │ │ ├── scala │ │ ├── LessCssApp.scala │ │ └── ScalatraBootstrap.scala │ │ └── webapp │ │ ├── WEB-INF │ │ ├── web.xml │ │ ├── wro.properties │ │ └── wro.xml │ │ └── less │ │ └── main.less └── swagger-example │ ├── .gitignore │ ├── README.md │ ├── project │ ├── build.properties │ ├── build.scala │ └── plugins.sbt │ ├── sbt │ └── src │ ├── main │ ├── resources │ │ └── logback.xml │ ├── scala │ │ ├── ScalatraBootstrap.scala │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── swagger │ │ │ ├── FlowersController.scala │ │ │ └── FlowersSwagger.scala │ └── webapp │ │ └── WEB-INF │ │ ├── layouts │ │ └── default.scaml │ │ ├── views │ │ └── hello-scalate.scaml │ │ └── web.xml │ └── test │ └── scala │ └── org │ └── scalatra │ └── example │ └── swagger │ └── FlowersSpec.scala ├── 2.4 ├── async │ ├── akka-examples │ │ ├── .gitignore │ │ ├── README.md │ │ ├── project │ │ │ ├── build.properties │ │ │ ├── build.scala │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ ├── logback.xml │ │ │ │ └── rebel.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── app │ │ │ │ │ ├── FutureController.scala │ │ │ │ │ └── MyActorApp.scala │ │ │ └── webapp │ │ │ │ └── WEB-INF │ │ │ │ ├── layouts │ │ │ │ └── default.scaml │ │ │ │ ├── views │ │ │ │ └── hello-scalate.scaml │ │ │ │ └── web.xml │ │ │ └── test │ │ │ └── scala │ │ │ └── com │ │ │ └── example │ │ │ └── app │ │ │ ├── FutureControllerSpec.scala │ │ │ └── MyActorAppSpec.scala │ ├── scalatra-atmosphere-embedded │ │ ├── .gitignore │ │ ├── README.md │ │ ├── project │ │ │ ├── build.properties │ │ │ ├── build.scala │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ ├── logback.xml │ │ │ │ └── rebel.xml │ │ │ ├── scala │ │ │ │ ├── JettyLauncher.scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ └── atmosphere │ │ │ │ │ └── ChatController.scala │ │ │ └── webapp │ │ │ │ ├── WEB-INF │ │ │ │ ├── layouts │ │ │ │ │ └── default.ssp │ │ │ │ ├── views │ │ │ │ │ └── index.ssp │ │ │ │ └── web.xml │ │ │ │ ├── css │ │ │ │ ├── bootstrap-responsive.css │ │ │ │ ├── bootstrap-responsive.min.css │ │ │ │ ├── bootstrap-theme.min.css │ │ │ │ ├── bootstrap.css │ │ │ │ └── bootstrap.min.css │ │ │ │ ├── img │ │ │ │ ├── glyphicons-halflings-white.png │ │ │ │ └── glyphicons-halflings.png │ │ │ │ └── js │ │ │ │ ├── application.js │ │ │ │ ├── bootstrap.js │ │ │ │ ├── bootstrap.min.js │ │ │ │ ├── html5shiv.js │ │ │ │ ├── jquery-1.9.0.js │ │ │ │ ├── jquery-atmosphere.js │ │ │ │ ├── jquery.atmosphere.js │ │ │ │ └── respond.min.js │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── atmosphere-example │ │ │ └── ChatControllerSpec.scala │ └── scalatra-atmosphere-example │ │ ├── .gitignore │ │ ├── README.md │ │ ├── project │ │ ├── build.properties │ │ ├── build.scala │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ ├── logback.xml │ │ │ └── rebel.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ └── atmosphere │ │ │ │ └── ChatController.scala │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── layouts │ │ │ │ └── default.ssp │ │ │ ├── views │ │ │ │ └── index.ssp │ │ │ └── web.xml │ │ │ ├── css │ │ │ ├── bootstrap-responsive.css │ │ │ ├── bootstrap-responsive.min.css │ │ │ ├── bootstrap-theme.min.css │ │ │ ├── bootstrap.css │ │ │ └── bootstrap.min.css │ │ │ ├── img │ │ │ ├── glyphicons-halflings-white.png │ │ │ └── glyphicons-halflings.png │ │ │ └── js │ │ │ ├── application.js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ ├── html5shiv.js │ │ │ ├── jquery-1.9.0.js │ │ │ ├── jquery-atmosphere.js │ │ │ ├── jquery.atmosphere.js │ │ │ └── respond.min.js │ │ └── test │ │ └── scala │ │ └── org │ │ └── scalatra │ │ └── atmosphere-example │ │ └── ChatControllerSpec.scala ├── deployment │ ├── scalatra-heroku │ │ ├── .gitignore │ │ ├── Procfile │ │ ├── README.md │ │ ├── project │ │ │ ├── build.properties │ │ │ ├── build.scala │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ └── main │ │ │ ├── scala │ │ │ ├── HerokuApp.scala │ │ │ ├── JettyLauncher.scala │ │ │ └── ScalatraBootstrap.scala │ │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── web.xml │ └── scalatra-jelastic │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ ├── build.scala │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ └── main │ │ ├── scala │ │ ├── JelasticApp.scala │ │ └── ScalatraBootstrap.scala │ │ └── webapp │ │ └── WEB-INF │ │ └── web.xml ├── formats │ └── scalatra-commands │ │ ├── .gitignore │ │ ├── README.md │ │ ├── project │ │ ├── build.properties │ │ ├── build.scala │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ ├── logback.xml │ │ │ └── rebel.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ └── databinding │ │ │ │ ├── TodosController.scala │ │ │ │ ├── commands │ │ │ │ └── TodoCommands.scala │ │ │ │ ├── data │ │ │ │ └── TodoData.scala │ │ │ │ ├── models │ │ │ │ └── Models.scala │ │ │ │ └── utils │ │ │ │ └── Logger.scala │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── layouts │ │ │ │ └── default.ssp │ │ │ ├── views │ │ │ │ └── todos │ │ │ │ │ └── index.ssp │ │ │ └── web.xml │ │ │ ├── css │ │ │ ├── bootstrap-responsive.css │ │ │ ├── bootstrap-responsive.min.css │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.min.css │ │ │ └── todo.css │ │ │ ├── img │ │ │ ├── glyphicons-halflings-white.png │ │ │ └── glyphicons-halflings.png │ │ │ └── js │ │ │ ├── bootstrap.js │ │ │ └── bootstrap.min.js │ │ └── test │ │ └── scala │ │ └── com │ │ └── futurechimps │ │ └── example │ │ └── databindings │ │ └── TodosControllerSpec.scala ├── http │ ├── authentication-demo │ │ ├── .gitignore │ │ ├── README.md │ │ ├── project │ │ │ ├── build.properties │ │ │ ├── build.scala │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ └── logback.xml │ │ │ └── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ ├── AuthDemo.scala │ │ │ │ └── AuthenticationSupport.scala │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── AuthDemoSpec.scala │ ├── scalatra-gzip │ │ ├── .gitignore │ │ ├── README.md │ │ ├── project │ │ │ ├── build.properties │ │ │ ├── build.scala │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ └── main │ │ │ ├── scala │ │ │ ├── GZipApp.scala │ │ │ └── ScalatraBootstrap.scala │ │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── web.xml │ ├── scalatra-http-client │ │ ├── .gitignore │ │ ├── README.md │ │ ├── project │ │ │ ├── build.properties │ │ │ ├── build.scala │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ └── main │ │ │ ├── scala │ │ │ ├── DispatchApp.scala │ │ │ └── ScalatraBootstrap.scala │ │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── web.xml │ ├── scalatra-http-demo │ │ ├── .gitignore │ │ ├── README.md │ │ ├── project │ │ │ ├── build.properties │ │ │ ├── build.scala │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ ├── CookiesExample.scala │ │ │ │ │ ├── FileUploadExample.scala │ │ │ │ │ ├── FilterExample.scala │ │ │ │ │ └── HttpExample.scala │ │ │ └── webapp │ │ │ │ ├── WEB-INF │ │ │ │ ├── templates │ │ │ │ │ ├── layouts │ │ │ │ │ │ └── default.jade │ │ │ │ │ └── views │ │ │ │ │ │ └── hello-scalate.jade │ │ │ │ └── web.xml │ │ │ │ └── assets │ │ │ │ ├── css │ │ │ │ ├── bootstrap-responsive.css │ │ │ │ ├── bootstrap-responsive.min.css │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.min.css │ │ │ │ ├── scalatra.css │ │ │ │ └── syntax.css │ │ │ │ ├── img │ │ │ │ ├── back_pattern.png │ │ │ │ ├── glyphicons-halflings-white.png │ │ │ │ ├── glyphicons-halflings.png │ │ │ │ ├── logo-s.png │ │ │ │ ├── logo-x.png │ │ │ │ ├── scalatra_logo.png │ │ │ │ └── skeletal_weave.png │ │ │ │ └── js │ │ │ │ ├── bootstrap.js │ │ │ │ ├── bootstrap.min.js │ │ │ │ └── jquery.min.js │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── HttpExampleSpec.scala │ └── scentry-auth-demo │ │ ├── .gitignore │ │ ├── README.md │ │ ├── project │ │ ├── build.properties │ │ ├── build.scala │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ └── logback.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── com │ │ │ │ └── constructiveproof │ │ │ │ └── example │ │ │ │ ├── ProtectedController.scala │ │ │ │ ├── ScentryauthdemoStack.scala │ │ │ │ ├── SessionsController.scala │ │ │ │ ├── auth │ │ │ │ ├── AuthenticationSupport.scala │ │ │ │ └── strategies │ │ │ │ │ ├── RememberMeStrategy.scala │ │ │ │ │ └── UserPasswordStrategy.scala │ │ │ │ └── models │ │ │ │ └── User.scala │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── templates │ │ │ ├── layouts │ │ │ │ └── default.ssp │ │ │ └── views │ │ │ │ └── sessions │ │ │ │ └── new.ssp │ │ │ └── web.xml │ │ └── test │ │ └── scala │ │ └── com │ │ └── constructiveproof │ │ └── example │ │ └── ProtectedServletSpec.scala ├── persistence │ ├── riak-example │ │ ├── .gitignore │ │ ├── README.md │ │ ├── project │ │ │ ├── build.properties │ │ │ ├── build.scala │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ ├── RiakExampleStack.scala │ │ │ │ │ ├── RiakSupport.scala │ │ │ │ │ └── SimpleRiakController.scala │ │ │ └── webapp │ │ │ │ └── WEB-INF │ │ │ │ ├── templates │ │ │ │ ├── layouts │ │ │ │ │ └── default.jade │ │ │ │ └── views │ │ │ │ │ └── hello-scalate.jade │ │ │ │ └── web.xml │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── RiakControllerTest.scala │ ├── scalatra-casbah-example │ │ ├── .gitignore │ │ ├── README.md │ │ ├── project │ │ │ ├── build.properties │ │ │ ├── build.scala │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ ├── MongoController.scala │ │ │ │ │ ├── ScalatraCasbahExampleStack.scala │ │ │ │ │ └── json_conversion.scala │ │ │ └── webapp │ │ │ │ └── WEB-INF │ │ │ │ ├── templates │ │ │ │ ├── layouts │ │ │ │ │ └── default.jade │ │ │ │ └── views │ │ │ │ │ └── hello-scalate.jade │ │ │ │ └── web.xml │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── MongoControllerSpec.scala │ ├── scalatra-slick │ │ ├── .gitignore │ │ ├── README.md │ │ ├── project │ │ │ ├── build.properties │ │ │ ├── build.scala │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ └── main │ │ │ ├── resources │ │ │ ├── c3p0.properties │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── slickexample │ │ │ │ └── slick.scala │ │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── web.xml │ └── scalatra-squeryl │ │ ├── .gitignore │ │ ├── README.md │ │ ├── project │ │ ├── build.properties │ │ ├── build.scala │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ └── logback.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ ├── ArticlesController.scala │ │ │ │ ├── init │ │ │ │ ├── DatabaseInit.scala │ │ │ │ └── DatabaseSessionSupport.scala │ │ │ │ └── models │ │ │ │ └── BlogDb.scala │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── layouts │ │ │ │ └── default.ssp │ │ │ ├── views │ │ │ │ └── articles │ │ │ │ │ ├── index.ssp │ │ │ │ │ └── new.ssp │ │ │ └── web.xml │ │ │ ├── css │ │ │ ├── bootstrap-responsive.css │ │ │ ├── bootstrap-responsive.min.css │ │ │ ├── bootstrap.css │ │ │ └── bootstrap.min.css │ │ │ ├── favicon.ico │ │ │ ├── img │ │ │ ├── glyphicons-halflings-white.png │ │ │ └── glyphicons-halflings.png │ │ │ └── js │ │ │ ├── angular-1.0.1.js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ └── jquery.min.js │ │ └── test │ │ └── scala │ │ └── org │ │ └── scalatra │ │ └── example │ │ └── ArticlesControllerSpec.scala ├── resources │ ├── scalatra-coffeescript │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ ├── build.scala │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ └── main │ │ │ ├── scala │ │ │ ├── CoffeeScriptApp.scala │ │ │ └── ScalatraBootstrap.scala │ │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── web.xml │ │ │ ├── wro.properties │ │ │ └── wro.xml │ │ │ └── coffee │ │ │ └── main.coffee │ └── scalatra-less-css │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ ├── build.scala │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ └── main │ │ ├── scala │ │ ├── LessCssApp.scala │ │ └── ScalatraBootstrap.scala │ │ └── webapp │ │ ├── WEB-INF │ │ ├── web.xml │ │ ├── wro.properties │ │ └── wro.xml │ │ └── less │ │ └── main.less └── swagger-example │ ├── .gitignore │ ├── README.md │ ├── project │ ├── build.properties │ ├── build.scala │ └── plugins.sbt │ ├── sbt │ └── src │ ├── main │ ├── resources │ │ └── logback.xml │ ├── scala │ │ ├── ScalatraBootstrap.scala │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── swagger │ │ │ ├── FlowersController.scala │ │ │ └── FlowersSwagger.scala │ └── webapp │ │ └── WEB-INF │ │ ├── layouts │ │ └── default.scaml │ │ ├── views │ │ └── hello-scalate.scaml │ │ └── web.xml │ └── test │ └── scala │ └── org │ └── scalatra │ └── example │ └── swagger │ └── FlowersSpec.scala ├── 2.5 ├── async │ ├── akka-examples │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ ├── logback.xml │ │ │ │ └── rebel.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── app │ │ │ │ │ ├── FutureController.scala │ │ │ │ │ └── MyActorApp.scala │ │ │ └── webapp │ │ │ │ └── WEB-INF │ │ │ │ ├── layouts │ │ │ │ └── default.scaml │ │ │ │ ├── views │ │ │ │ └── hello-scalate.scaml │ │ │ │ └── web.xml │ │ │ └── test │ │ │ └── scala │ │ │ └── com │ │ │ └── example │ │ │ └── app │ │ │ ├── FutureControllerSpec.scala │ │ │ └── MyActorAppSpec.scala │ ├── scalatra-atmosphere-embedded │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ ├── logback.xml │ │ │ │ └── rebel.xml │ │ │ ├── scala │ │ │ │ ├── JettyLauncher.scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ └── atmosphere │ │ │ │ │ └── ChatController.scala │ │ │ └── webapp │ │ │ │ ├── WEB-INF │ │ │ │ ├── layouts │ │ │ │ │ └── default.ssp │ │ │ │ ├── views │ │ │ │ │ └── index.ssp │ │ │ │ └── web.xml │ │ │ │ ├── css │ │ │ │ ├── bootstrap-responsive.css │ │ │ │ ├── bootstrap-responsive.min.css │ │ │ │ ├── bootstrap-theme.min.css │ │ │ │ ├── bootstrap.css │ │ │ │ └── bootstrap.min.css │ │ │ │ ├── img │ │ │ │ ├── glyphicons-halflings-white.png │ │ │ │ └── glyphicons-halflings.png │ │ │ │ └── js │ │ │ │ ├── application.js │ │ │ │ ├── bootstrap.js │ │ │ │ ├── bootstrap.min.js │ │ │ │ ├── html5shiv.js │ │ │ │ ├── jquery-1.9.0.js │ │ │ │ ├── jquery.atmosphere.js │ │ │ │ └── respond.min.js │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── atmosphere-example │ │ │ └── ChatControllerSpec.scala │ └── scalatra-atmosphere-example │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ ├── logback.xml │ │ │ └── rebel.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ └── atmosphere │ │ │ │ └── ChatController.scala │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── layouts │ │ │ │ └── default.ssp │ │ │ ├── views │ │ │ │ └── index.ssp │ │ │ └── web.xml │ │ │ ├── css │ │ │ ├── bootstrap-responsive.css │ │ │ ├── bootstrap-responsive.min.css │ │ │ ├── bootstrap-theme.min.css │ │ │ ├── bootstrap.css │ │ │ └── bootstrap.min.css │ │ │ ├── img │ │ │ ├── glyphicons-halflings-white.png │ │ │ └── glyphicons-halflings.png │ │ │ └── js │ │ │ ├── application.js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ ├── html5shiv.js │ │ │ ├── jquery-1.9.0.js │ │ │ ├── jquery.atmosphere.js │ │ │ └── respond.min.js │ │ └── test │ │ └── scala │ │ └── org │ │ └── scalatra │ │ └── atmosphere-example │ │ └── ChatControllerSpec.scala ├── deployment │ └── scalatra-heroku │ │ ├── .gitignore │ │ ├── Procfile │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ └── main │ │ ├── scala │ │ ├── HerokuApp.scala │ │ ├── JettyLauncher.scala │ │ └── ScalatraBootstrap.scala │ │ └── webapp │ │ └── WEB-INF │ │ └── web.xml ├── formats │ └── scalatra-commands │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ ├── logback.xml │ │ │ └── rebel.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ └── databinding │ │ │ │ ├── TodosController.scala │ │ │ │ ├── commands │ │ │ │ └── TodoCommands.scala │ │ │ │ ├── data │ │ │ │ └── TodoData.scala │ │ │ │ ├── models │ │ │ │ └── Models.scala │ │ │ │ └── utils │ │ │ │ └── Logger.scala │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── layouts │ │ │ │ └── default.ssp │ │ │ ├── views │ │ │ │ └── todos │ │ │ │ │ └── index.ssp │ │ │ └── web.xml │ │ │ ├── css │ │ │ ├── bootstrap-responsive.css │ │ │ ├── bootstrap-responsive.min.css │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.min.css │ │ │ └── todo.css │ │ │ ├── img │ │ │ ├── glyphicons-halflings-white.png │ │ │ └── glyphicons-halflings.png │ │ │ └── js │ │ │ ├── bootstrap.js │ │ │ └── bootstrap.min.js │ │ └── test │ │ └── scala │ │ └── com │ │ └── futurechimps │ │ └── example │ │ └── databindings │ │ └── TodosControllerSpec.scala ├── http │ ├── authentication-demo │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ ├── AuthDemo.scala │ │ │ │ │ └── AuthenticationSupport.scala │ │ │ └── webapp │ │ │ │ └── WEB-INF │ │ │ │ └── web.xml │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── AuthDemoSpec.scala │ ├── scalatra-gzip │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ └── main │ │ │ ├── scala │ │ │ ├── GZipApp.scala │ │ │ └── ScalatraBootstrap.scala │ │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── web.xml │ ├── scalatra-http-demo │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ ├── CookiesExample.scala │ │ │ │ │ ├── FileUploadExample.scala │ │ │ │ │ ├── FilterExample.scala │ │ │ │ │ └── HttpExample.scala │ │ │ └── webapp │ │ │ │ ├── WEB-INF │ │ │ │ ├── templates │ │ │ │ │ ├── layouts │ │ │ │ │ │ └── default.jade │ │ │ │ │ └── views │ │ │ │ │ │ └── hello-scalate.jade │ │ │ │ └── web.xml │ │ │ │ └── assets │ │ │ │ ├── css │ │ │ │ ├── bootstrap-responsive.css │ │ │ │ ├── bootstrap-responsive.min.css │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.min.css │ │ │ │ ├── scalatra.css │ │ │ │ └── syntax.css │ │ │ │ ├── img │ │ │ │ ├── back_pattern.png │ │ │ │ ├── glyphicons-halflings-white.png │ │ │ │ ├── glyphicons-halflings.png │ │ │ │ ├── logo-s.png │ │ │ │ ├── logo-x.png │ │ │ │ ├── scalatra_logo.png │ │ │ │ └── skeletal_weave.png │ │ │ │ └── js │ │ │ │ ├── bootstrap.js │ │ │ │ ├── bootstrap.min.js │ │ │ │ └── jquery.min.js │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── HttpExampleSpec.scala │ └── scentry-auth-demo │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ └── logback.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── com │ │ │ │ └── constructiveproof │ │ │ │ └── example │ │ │ │ ├── ProtectedController.scala │ │ │ │ ├── ScentryauthdemoStack.scala │ │ │ │ ├── SessionsController.scala │ │ │ │ ├── auth │ │ │ │ ├── AuthenticationSupport.scala │ │ │ │ └── strategies │ │ │ │ │ ├── RememberMeStrategy.scala │ │ │ │ │ └── UserPasswordStrategy.scala │ │ │ │ └── models │ │ │ │ └── User.scala │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── templates │ │ │ ├── layouts │ │ │ │ └── default.ssp │ │ │ └── views │ │ │ │ └── sessions │ │ │ │ └── new.ssp │ │ │ └── web.xml │ │ └── test │ │ └── scala │ │ └── com │ │ └── constructiveproof │ │ └── example │ │ └── ProtectedServletSpec.scala ├── persistence │ ├── riak-example │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ ├── RiakExampleStack.scala │ │ │ │ │ ├── RiakSupport.scala │ │ │ │ │ └── SimpleRiakController.scala │ │ │ └── webapp │ │ │ │ └── WEB-INF │ │ │ │ ├── templates │ │ │ │ ├── layouts │ │ │ │ │ └── default.jade │ │ │ │ └── views │ │ │ │ │ └── hello-scalate.jade │ │ │ │ └── web.xml │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── RiakControllerTest.scala │ ├── scalatra-casbah-example │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ ├── MongoController.scala │ │ │ │ │ ├── ScalatraCasbahExampleStack.scala │ │ │ │ │ └── json_conversion.scala │ │ │ └── webapp │ │ │ │ └── WEB-INF │ │ │ │ ├── templates │ │ │ │ ├── layouts │ │ │ │ │ └── default.jade │ │ │ │ └── views │ │ │ │ │ └── hello-scalate.jade │ │ │ │ └── web.xml │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── MongoControllerSpec.scala │ ├── scalatra-slick │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ └── main │ │ │ ├── resources │ │ │ ├── c3p0.properties │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── slickexample │ │ │ │ └── slick.scala │ │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── web.xml │ └── scalatra-squeryl │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ └── logback.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ ├── ArticlesController.scala │ │ │ │ ├── init │ │ │ │ ├── DatabaseInit.scala │ │ │ │ └── DatabaseSessionSupport.scala │ │ │ │ └── models │ │ │ │ └── BlogDb.scala │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── layouts │ │ │ │ └── default.ssp │ │ │ ├── views │ │ │ │ └── articles │ │ │ │ │ ├── index.ssp │ │ │ │ │ └── new.ssp │ │ │ └── web.xml │ │ │ ├── css │ │ │ ├── bootstrap-responsive.css │ │ │ ├── bootstrap-responsive.min.css │ │ │ ├── bootstrap.css │ │ │ └── bootstrap.min.css │ │ │ ├── favicon.ico │ │ │ ├── img │ │ │ ├── glyphicons-halflings-white.png │ │ │ └── glyphicons-halflings.png │ │ │ └── js │ │ │ ├── angular-1.0.1.js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ └── jquery.min.js │ │ └── test │ │ └── scala │ │ └── org │ │ └── scalatra │ │ └── example │ │ └── ArticlesControllerSpec.scala ├── resources │ ├── scalatra-coffeescript │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ └── main │ │ │ ├── scala │ │ │ ├── CoffeeScriptApp.scala │ │ │ └── ScalatraBootstrap.scala │ │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── web.xml │ │ │ ├── wro.properties │ │ │ └── wro.xml │ │ │ └── coffee │ │ │ └── main.coffee │ └── scalatra-less-css │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ └── main │ │ ├── scala │ │ ├── LessCssApp.scala │ │ └── ScalatraBootstrap.scala │ │ └── webapp │ │ ├── WEB-INF │ │ ├── web.xml │ │ ├── wro.properties │ │ └── wro.xml │ │ └── less │ │ └── main.less ├── swagger-example │ ├── .gitignore │ ├── README.md │ ├── build.sbt │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ ├── sbt │ └── src │ │ ├── main │ │ ├── resources │ │ │ └── logback.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ └── swagger │ │ │ │ ├── FlowersController.scala │ │ │ │ └── FlowersSwagger.scala │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── layouts │ │ │ └── default.scaml │ │ │ ├── views │ │ │ └── hello-scalate.scaml │ │ │ └── web.xml │ │ └── test │ │ └── scala │ │ └── org │ │ └── scalatra │ │ └── example │ │ └── swagger │ │ └── FlowersSpec.scala └── views │ └── scalatra-twirl │ ├── .gitignore │ ├── README.md │ ├── build.sbt │ ├── project │ ├── build.properties │ └── plugins.sbt │ ├── sbt │ └── src │ ├── main │ ├── resources │ │ └── logback.xml │ ├── scala │ │ ├── ScalatraBootstrap.scala │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── ScalatraTwirlServlet.scala │ ├── twirl │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── hello.scala.html │ └── webapp │ │ └── WEB-INF │ │ └── web.xml │ └── test │ └── scala │ └── com │ └── example │ └── TwirlExampleSpec.scala ├── 2.6 ├── async │ ├── akka-examples │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ ├── logback.xml │ │ │ │ └── rebel.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ ├── FutureController.scala │ │ │ │ │ └── MyActorApp.scala │ │ │ └── webapp │ │ │ │ └── WEB-INF │ │ │ │ ├── layouts │ │ │ │ └── default.scaml │ │ │ │ ├── views │ │ │ │ └── hello-scalate.scaml │ │ │ │ └── web.xml │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ ├── FutureControllerSpec.scala │ │ │ └── MyActorAppSpec.scala │ ├── scalatra-atmosphere-embedded │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ ├── logback.xml │ │ │ │ └── rebel.xml │ │ │ ├── scala │ │ │ │ ├── JettyLauncher.scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ └── atmosphere │ │ │ │ │ └── ChatController.scala │ │ │ └── webapp │ │ │ │ ├── WEB-INF │ │ │ │ ├── layouts │ │ │ │ │ └── default.ssp │ │ │ │ ├── views │ │ │ │ │ └── index.ssp │ │ │ │ └── web.xml │ │ │ │ ├── css │ │ │ │ ├── bootstrap-responsive.css │ │ │ │ ├── bootstrap-responsive.min.css │ │ │ │ ├── bootstrap-theme.min.css │ │ │ │ ├── bootstrap.css │ │ │ │ └── bootstrap.min.css │ │ │ │ ├── img │ │ │ │ ├── glyphicons-halflings-white.png │ │ │ │ └── glyphicons-halflings.png │ │ │ │ └── js │ │ │ │ ├── application.js │ │ │ │ ├── bootstrap.js │ │ │ │ ├── bootstrap.min.js │ │ │ │ ├── html5shiv.js │ │ │ │ ├── jquery-1.9.0.js │ │ │ │ ├── jquery.atmosphere.js │ │ │ │ └── respond.min.js │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── atmosphere-example │ │ │ └── ChatControllerSpec.scala │ └── scalatra-atmosphere-example │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ └── logback.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ └── atmosphere │ │ │ │ └── ChatController.scala │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── layouts │ │ │ │ └── default.ssp │ │ │ ├── views │ │ │ │ └── index.ssp │ │ │ └── web.xml │ │ │ ├── css │ │ │ ├── bootstrap-responsive.css │ │ │ ├── bootstrap-responsive.min.css │ │ │ ├── bootstrap-theme.min.css │ │ │ ├── bootstrap.css │ │ │ └── bootstrap.min.css │ │ │ ├── img │ │ │ ├── glyphicons-halflings-white.png │ │ │ └── glyphicons-halflings.png │ │ │ └── js │ │ │ ├── application.js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ ├── html5shiv.js │ │ │ ├── jquery-1.9.0.js │ │ │ ├── jquery.atmosphere.js │ │ │ └── respond.min.js │ │ └── test │ │ └── scala │ │ └── org │ │ └── scalatra │ │ └── atmosphere-example │ │ └── ChatControllerSpec.scala ├── deployment │ └── scalatra-heroku │ │ ├── .gitignore │ │ ├── Procfile │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── scala │ │ │ ├── JettyLauncher.scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ └── HerokuApp.scala │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── web.xml │ │ └── test │ │ └── scala │ │ └── org │ │ └── scalatra │ │ └── example │ │ └── HerokuAppSpec.scala ├── formats │ └── scalatra-forms │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ ├── logback.xml │ │ │ └── rebel.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ └── forms │ │ │ │ └── FormsController.scala │ │ ├── twirl │ │ │ ├── form.scala.html │ │ │ └── result.scala.html │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ └── web.xml │ │ │ ├── css │ │ │ ├── bootstrap-theme.css │ │ │ ├── bootstrap-theme.css.map │ │ │ ├── bootstrap-theme.min.css │ │ │ ├── bootstrap-theme.min.css.map │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ ├── bootstrap.min.css │ │ │ └── bootstrap.min.css.map │ │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ └── js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ └── npm.js │ │ └── test │ │ └── scala │ │ └── org │ │ └── scalatra │ │ └── example │ │ └── forms │ │ └── FormsControllerSpec.scala ├── http │ ├── authentication-demo │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ ├── AuthDemo.scala │ │ │ │ │ └── AuthenticationSupport.scala │ │ │ └── webapp │ │ │ │ └── WEB-INF │ │ │ │ └── web.xml │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── AuthDemoSpec.scala │ ├── scalatra-gzip │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ └── GZipApp.scala │ │ │ └── webapp │ │ │ │ └── WEB-INF │ │ │ │ └── web.xml │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── GZipSpec.scala │ ├── scalatra-http-demo │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ ├── CookiesExample.scala │ │ │ │ │ ├── FileUploadExample.scala │ │ │ │ │ ├── FilterExample.scala │ │ │ │ │ └── HttpExample.scala │ │ │ └── webapp │ │ │ │ ├── WEB-INF │ │ │ │ └── web.xml │ │ │ │ └── assets │ │ │ │ ├── css │ │ │ │ ├── bootstrap-responsive.css │ │ │ │ ├── bootstrap-responsive.min.css │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.min.css │ │ │ │ ├── scalatra.css │ │ │ │ └── syntax.css │ │ │ │ ├── img │ │ │ │ ├── back_pattern.png │ │ │ │ ├── glyphicons-halflings-white.png │ │ │ │ ├── glyphicons-halflings.png │ │ │ │ ├── logo-s.png │ │ │ │ ├── logo-x.png │ │ │ │ ├── scalatra_logo.png │ │ │ │ └── skeletal_weave.png │ │ │ │ └── js │ │ │ │ ├── bootstrap.js │ │ │ │ ├── bootstrap.min.js │ │ │ │ └── jquery.min.js │ │ │ └── test │ │ │ ├── resources │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ └── scalatra.txt │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ ├── CookiesExampleSpec.scala │ │ │ ├── FileUploadExampleSpec.scala │ │ │ ├── FilterExampleSpec.scala │ │ │ └── HttpExampleSpec.scala │ └── scentry-auth-demo │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ └── logback.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── com │ │ │ │ └── constructiveproof │ │ │ │ └── example │ │ │ │ ├── ProtectedController.scala │ │ │ │ ├── ScentryauthdemoStack.scala │ │ │ │ ├── SessionsController.scala │ │ │ │ ├── auth │ │ │ │ ├── AuthenticationSupport.scala │ │ │ │ └── strategies │ │ │ │ │ ├── RememberMeStrategy.scala │ │ │ │ │ └── UserPasswordStrategy.scala │ │ │ │ └── models │ │ │ │ └── User.scala │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── templates │ │ │ ├── layouts │ │ │ │ └── default.ssp │ │ │ └── views │ │ │ │ └── sessions │ │ │ │ └── new.ssp │ │ │ └── web.xml │ │ └── test │ │ └── scala │ │ └── com │ │ └── constructiveproof │ │ └── example │ │ ├── ScentryAuthFailureSpec.scala │ │ └── ScentryAuthSuccessSpec.scala ├── persistence │ ├── scalatra-slick │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ ├── c3p0.properties │ │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── slickexample │ │ │ │ │ └── SlickApp.scala │ │ │ └── webapp │ │ │ │ └── WEB-INF │ │ │ │ └── web.xml │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── slickexample │ │ │ └── SlickAppSpec.scala │ └── scalatra-squeryl │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ └── logback.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ ├── ArticlesController.scala │ │ │ │ ├── init │ │ │ │ ├── DatabaseInit.scala │ │ │ │ └── DatabaseSessionSupport.scala │ │ │ │ └── models │ │ │ │ └── BlogDb.scala │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── layouts │ │ │ │ └── default.ssp │ │ │ ├── views │ │ │ │ └── articles │ │ │ │ │ ├── index.ssp │ │ │ │ │ └── new.ssp │ │ │ └── web.xml │ │ │ ├── css │ │ │ ├── bootstrap-responsive.css │ │ │ ├── bootstrap-responsive.min.css │ │ │ ├── bootstrap.css │ │ │ └── bootstrap.min.css │ │ │ ├── favicon.ico │ │ │ ├── img │ │ │ ├── glyphicons-halflings-white.png │ │ │ └── glyphicons-halflings.png │ │ │ └── js │ │ │ ├── angular-1.0.1.js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ └── jquery.min.js │ │ └── test │ │ └── scala │ │ └── org │ │ └── scalatra │ │ └── example │ │ └── ArticlesControllerSpec.scala ├── swagger-example │ ├── .gitignore │ ├── README.md │ ├── build.sbt │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ ├── sbt │ └── src │ │ ├── main │ │ ├── resources │ │ │ └── logback.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ └── swagger │ │ │ │ ├── FlowersController.scala │ │ │ │ └── FlowersSwagger.scala │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── layouts │ │ │ └── default.scaml │ │ │ ├── views │ │ │ └── hello-scalate.scaml │ │ │ └── web.xml │ │ └── test │ │ └── scala │ │ └── org │ │ └── scalatra │ │ └── example │ │ └── swagger │ │ └── FlowersSpec.scala └── views │ └── scalatra-twirl │ ├── .gitignore │ ├── README.md │ ├── build.sbt │ ├── project │ ├── build.properties │ └── plugins.sbt │ ├── sbt │ └── src │ ├── main │ ├── resources │ │ └── logback.xml │ ├── scala │ │ ├── ScalatraBootstrap.scala │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── ScalatraTwirlServlet.scala │ ├── twirl │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── hello.scala.html │ └── webapp │ │ └── WEB-INF │ │ └── web.xml │ └── test │ └── scala │ └── com │ └── example │ └── TwirlExampleSpec.scala ├── 2.7 ├── async │ ├── akka-examples │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ ├── logback.xml │ │ │ │ └── rebel.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── app │ │ │ │ │ ├── FutureController.scala │ │ │ │ │ └── MyActorApp.scala │ │ │ └── webapp │ │ │ │ └── WEB-INF │ │ │ │ ├── layouts │ │ │ │ └── default.scaml │ │ │ │ ├── views │ │ │ │ └── hello-scalate.scaml │ │ │ │ └── web.xml │ │ │ └── test │ │ │ └── scala │ │ │ └── com │ │ │ └── example │ │ │ └── app │ │ │ ├── FutureControllerSpec.scala │ │ │ └── MyActorAppSpec.scala │ ├── scalatra-atmosphere-embedded │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ ├── logback.xml │ │ │ │ └── rebel.xml │ │ │ ├── scala │ │ │ │ ├── JettyLauncher.scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ └── atmosphere │ │ │ │ │ └── ChatController.scala │ │ │ └── webapp │ │ │ │ ├── WEB-INF │ │ │ │ ├── layouts │ │ │ │ │ └── default.ssp │ │ │ │ ├── views │ │ │ │ │ └── index.ssp │ │ │ │ └── web.xml │ │ │ │ ├── css │ │ │ │ ├── bootstrap-responsive.css │ │ │ │ ├── bootstrap-responsive.min.css │ │ │ │ ├── bootstrap-theme.min.css │ │ │ │ ├── bootstrap.css │ │ │ │ └── bootstrap.min.css │ │ │ │ ├── img │ │ │ │ ├── glyphicons-halflings-white.png │ │ │ │ └── glyphicons-halflings.png │ │ │ │ └── js │ │ │ │ ├── application.js │ │ │ │ ├── bootstrap.js │ │ │ │ ├── bootstrap.min.js │ │ │ │ ├── html5shiv.js │ │ │ │ ├── jquery-1.9.0.js │ │ │ │ ├── jquery.atmosphere.js │ │ │ │ └── respond.min.js │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── atmosphere-example │ │ │ └── ChatControllerSpec.scala │ └── scalatra-atmosphere-example │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ ├── logback.xml │ │ │ └── rebel.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ └── atmosphere │ │ │ │ └── ChatController.scala │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── layouts │ │ │ │ └── default.ssp │ │ │ ├── views │ │ │ │ └── index.ssp │ │ │ └── web.xml │ │ │ ├── css │ │ │ ├── bootstrap-responsive.css │ │ │ ├── bootstrap-responsive.min.css │ │ │ ├── bootstrap-theme.min.css │ │ │ ├── bootstrap.css │ │ │ └── bootstrap.min.css │ │ │ ├── img │ │ │ ├── glyphicons-halflings-white.png │ │ │ └── glyphicons-halflings.png │ │ │ └── js │ │ │ ├── application.js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ ├── html5shiv.js │ │ │ ├── jquery-1.9.0.js │ │ │ ├── jquery.atmosphere.js │ │ │ └── respond.min.js │ │ └── test │ │ └── scala │ │ └── org │ │ └── scalatra │ │ └── atmosphere-example │ │ └── ChatControllerSpec.scala ├── deployment │ └── scalatra-heroku │ │ ├── .gitignore │ │ ├── Procfile │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ └── main │ │ ├── scala │ │ ├── HerokuApp.scala │ │ ├── JettyLauncher.scala │ │ └── ScalatraBootstrap.scala │ │ └── webapp │ │ └── WEB-INF │ │ └── web.xml ├── formats │ └── scalatra-forms │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ ├── logback.xml │ │ │ └── rebel.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ └── forms │ │ │ │ └── FormsController.scala │ │ ├── twirl │ │ │ ├── form.scala.html │ │ │ └── result.scala.html │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ └── web.xml │ │ │ ├── css │ │ │ ├── bootstrap-theme.css │ │ │ ├── bootstrap-theme.css.map │ │ │ ├── bootstrap-theme.min.css │ │ │ ├── bootstrap-theme.min.css.map │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ ├── bootstrap.min.css │ │ │ └── bootstrap.min.css.map │ │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ └── js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ └── npm.js │ │ └── test │ │ └── scala │ │ └── org │ │ └── scalatra │ │ └── example │ │ └── forms │ │ └── FormsControllerSpec.scala ├── http │ ├── authentication-demo │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ ├── AuthDemo.scala │ │ │ │ │ └── AuthenticationSupport.scala │ │ │ └── webapp │ │ │ │ └── WEB-INF │ │ │ │ └── web.xml │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── AuthDemoSpec.scala │ ├── scalatra-gzip │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ └── GZipApp.scala │ │ │ └── webapp │ │ │ │ └── WEB-INF │ │ │ │ └── web.xml │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── GZipSpec.scala │ ├── scalatra-http-demo │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ ├── CookiesExample.scala │ │ │ │ │ ├── FileUploadExample.scala │ │ │ │ │ ├── FilterExample.scala │ │ │ │ │ └── HttpExample.scala │ │ │ └── webapp │ │ │ │ ├── WEB-INF │ │ │ │ ├── templates │ │ │ │ │ ├── layouts │ │ │ │ │ │ └── default.jade │ │ │ │ │ └── views │ │ │ │ │ │ └── hello-scalate.jade │ │ │ │ └── web.xml │ │ │ │ └── assets │ │ │ │ ├── css │ │ │ │ ├── bootstrap-responsive.css │ │ │ │ ├── bootstrap-responsive.min.css │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.min.css │ │ │ │ ├── scalatra.css │ │ │ │ └── syntax.css │ │ │ │ ├── img │ │ │ │ ├── back_pattern.png │ │ │ │ ├── glyphicons-halflings-white.png │ │ │ │ ├── glyphicons-halflings.png │ │ │ │ ├── logo-s.png │ │ │ │ ├── logo-x.png │ │ │ │ ├── scalatra_logo.png │ │ │ │ └── skeletal_weave.png │ │ │ │ └── js │ │ │ │ ├── bootstrap.js │ │ │ │ ├── bootstrap.min.js │ │ │ │ └── jquery.min.js │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── HttpExampleSpec.scala │ └── scentry-auth-demo │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ └── logback.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── com │ │ │ │ └── constructiveproof │ │ │ │ └── example │ │ │ │ ├── ProtectedController.scala │ │ │ │ ├── ScentryauthdemoStack.scala │ │ │ │ ├── SessionsController.scala │ │ │ │ ├── auth │ │ │ │ ├── AuthenticationSupport.scala │ │ │ │ └── strategies │ │ │ │ │ ├── RememberMeStrategy.scala │ │ │ │ │ └── UserPasswordStrategy.scala │ │ │ │ └── models │ │ │ │ └── User.scala │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── templates │ │ │ ├── layouts │ │ │ │ └── default.ssp │ │ │ └── views │ │ │ │ └── sessions │ │ │ │ └── new.ssp │ │ │ └── web.xml │ │ └── test │ │ └── scala │ │ └── com │ │ └── constructiveproof │ │ └── example │ │ ├── ScentryAuthFailureSpec.scala │ │ └── ScentryAuthSuccessSpec.scala ├── persistence │ ├── scalatra-mongo │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ └── main │ │ │ ├── resources │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ ├── MongoController.scala │ │ │ │ └── ScalatraMongoExample.scala │ │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── web.xml │ ├── scalatra-slick │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ ├── c3p0.properties │ │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── slickexample │ │ │ │ │ └── SlickApp.scala │ │ │ └── webapp │ │ │ │ └── WEB-INF │ │ │ │ └── web.xml │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── slickexample │ │ │ └── SlickAppSpec.scala │ └── scalatra-squeryl │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ └── logback.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ ├── ArticlesController.scala │ │ │ │ ├── init │ │ │ │ ├── DatabaseInit.scala │ │ │ │ └── DatabaseSessionSupport.scala │ │ │ │ └── models │ │ │ │ └── BlogDb.scala │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── layouts │ │ │ │ └── default.ssp │ │ │ ├── views │ │ │ │ └── articles │ │ │ │ │ ├── index.ssp │ │ │ │ │ └── new.ssp │ │ │ └── web.xml │ │ │ ├── css │ │ │ ├── bootstrap-responsive.css │ │ │ ├── bootstrap-responsive.min.css │ │ │ ├── bootstrap.css │ │ │ └── bootstrap.min.css │ │ │ ├── favicon.ico │ │ │ ├── img │ │ │ ├── glyphicons-halflings-white.png │ │ │ └── glyphicons-halflings.png │ │ │ └── js │ │ │ ├── angular-1.0.1.js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ └── jquery.min.js │ │ └── test │ │ └── scala │ │ └── org │ │ └── scalatra │ │ └── example │ │ └── ArticlesControllerSpec.scala ├── swagger-example │ ├── .gitignore │ ├── README.md │ ├── build.sbt │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ ├── sbt │ └── src │ │ ├── main │ │ ├── resources │ │ │ └── logback.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ └── swagger │ │ │ │ ├── FlowersController.scala │ │ │ │ └── FlowersSwagger.scala │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── layouts │ │ │ └── default.scaml │ │ │ ├── views │ │ │ └── hello-scalate.scaml │ │ │ └── web.xml │ │ └── test │ │ └── scala │ │ └── org │ │ └── scalatra │ │ └── example │ │ └── swagger │ │ └── FlowersSpec.scala └── views │ └── scalatra-twirl │ ├── .gitignore │ ├── README.md │ ├── build.sbt │ ├── project │ ├── build.properties │ └── plugins.sbt │ ├── sbt │ └── src │ ├── main │ ├── resources │ │ └── logback.xml │ ├── scala │ │ ├── ScalatraBootstrap.scala │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── ScalatraTwirlServlet.scala │ ├── twirl │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── hello.scala.html │ └── webapp │ │ └── WEB-INF │ │ └── web.xml │ └── test │ └── scala │ └── com │ └── example │ └── TwirlExampleSpec.scala ├── 2.8 ├── async │ └── akka-examples │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ ├── logback.xml │ │ │ └── rebel.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── app │ │ │ │ ├── FutureController.scala │ │ │ │ └── MyActorApp.scala │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── web.xml │ │ └── test │ │ └── scala │ │ └── com │ │ └── example │ │ └── app │ │ ├── FutureControllerSpec.scala │ │ └── MyActorAppSpec.scala ├── deployment │ └── scalatra-heroku │ │ ├── .gitignore │ │ ├── Procfile │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ └── main │ │ ├── scala │ │ ├── HerokuApp.scala │ │ ├── JettyLauncher.scala │ │ └── ScalatraBootstrap.scala │ │ └── webapp │ │ └── WEB-INF │ │ └── web.xml ├── formats │ └── scalatra-forms │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ ├── logback.xml │ │ │ └── rebel.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ └── forms │ │ │ │ └── FormsController.scala │ │ ├── twirl │ │ │ ├── form.scala.html │ │ │ └── result.scala.html │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ └── web.xml │ │ │ ├── css │ │ │ ├── bootstrap-theme.css │ │ │ ├── bootstrap-theme.css.map │ │ │ ├── bootstrap-theme.min.css │ │ │ ├── bootstrap-theme.min.css.map │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ ├── bootstrap.min.css │ │ │ └── bootstrap.min.css.map │ │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ └── js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ └── npm.js │ │ └── test │ │ └── scala │ │ └── org │ │ └── scalatra │ │ └── example │ │ └── forms │ │ └── FormsControllerSpec.scala ├── http │ ├── authentication-demo │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ ├── AuthDemo.scala │ │ │ │ │ └── AuthenticationSupport.scala │ │ │ └── webapp │ │ │ │ └── WEB-INF │ │ │ │ └── web.xml │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── AuthDemoSpec.scala │ ├── scalatra-gzip │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ └── GZipApp.scala │ │ │ └── webapp │ │ │ │ └── WEB-INF │ │ │ │ └── web.xml │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── GZipSpec.scala │ ├── scalatra-http-demo │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ ├── CookiesExample.scala │ │ │ │ │ ├── FileUploadExample.scala │ │ │ │ │ ├── FilterExample.scala │ │ │ │ │ └── HttpExample.scala │ │ │ └── webapp │ │ │ │ ├── WEB-INF │ │ │ │ └── web.xml │ │ │ │ └── assets │ │ │ │ ├── css │ │ │ │ ├── bootstrap-responsive.css │ │ │ │ ├── bootstrap-responsive.min.css │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.min.css │ │ │ │ ├── scalatra.css │ │ │ │ └── syntax.css │ │ │ │ ├── img │ │ │ │ ├── back_pattern.png │ │ │ │ ├── glyphicons-halflings-white.png │ │ │ │ ├── glyphicons-halflings.png │ │ │ │ ├── logo-s.png │ │ │ │ ├── logo-x.png │ │ │ │ ├── scalatra_logo.png │ │ │ │ └── skeletal_weave.png │ │ │ │ └── js │ │ │ │ ├── bootstrap.js │ │ │ │ ├── bootstrap.min.js │ │ │ │ └── jquery.min.js │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── HttpExampleSpec.scala │ └── scentry-auth-demo │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ └── logback.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── com │ │ │ │ └── constructiveproof │ │ │ │ └── example │ │ │ │ ├── ProtectedController.scala │ │ │ │ ├── SessionsController.scala │ │ │ │ ├── auth │ │ │ │ ├── AuthenticationSupport.scala │ │ │ │ └── strategies │ │ │ │ │ ├── RememberMeStrategy.scala │ │ │ │ │ └── UserPasswordStrategy.scala │ │ │ │ └── models │ │ │ │ └── User.scala │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── web.xml │ │ └── test │ │ └── scala │ │ └── com │ │ └── constructiveproof │ │ └── example │ │ ├── ScentryAuthFailureSpec.scala │ │ └── ScentryAuthSuccessSpec.scala ├── persistence │ ├── scalatra-mongo │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ └── main │ │ │ ├── resources │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ ├── MongoController.scala │ │ │ │ └── ScalatraMongoExample.scala │ │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── web.xml │ ├── scalatra-slick │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ ├── c3p0.properties │ │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── slickexample │ │ │ │ │ └── SlickApp.scala │ │ │ └── webapp │ │ │ │ └── WEB-INF │ │ │ │ └── web.xml │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── slickexample │ │ │ └── SlickAppSpec.scala │ └── scalatra-squeryl │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ └── logback.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ ├── ArticlesController.scala │ │ │ │ ├── init │ │ │ │ ├── DatabaseInit.scala │ │ │ │ └── DatabaseSessionSupport.scala │ │ │ │ └── models │ │ │ │ └── BlogDb.scala │ │ ├── twirl │ │ │ ├── form.scala.html │ │ │ ├── index.scala.html │ │ │ └── layout.scala.html │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── layouts │ │ │ │ └── default.ssp │ │ │ ├── views │ │ │ │ └── articles │ │ │ │ │ ├── index.ssp │ │ │ │ │ └── new.ssp │ │ │ └── web.xml │ │ │ ├── css │ │ │ ├── bootstrap-responsive.css │ │ │ ├── bootstrap-responsive.min.css │ │ │ ├── bootstrap.css │ │ │ └── bootstrap.min.css │ │ │ ├── favicon.ico │ │ │ ├── img │ │ │ ├── glyphicons-halflings-white.png │ │ │ └── glyphicons-halflings.png │ │ │ └── js │ │ │ ├── angular-1.0.1.js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ └── jquery.min.js │ │ └── test │ │ └── scala │ │ └── org │ │ └── scalatra │ │ └── example │ │ └── ArticlesControllerSpec.scala ├── swagger-example │ ├── .gitignore │ ├── README.md │ ├── build.sbt │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ ├── sbt │ └── src │ │ ├── main │ │ ├── resources │ │ │ └── logback.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ └── swagger │ │ │ │ ├── FlowersController.scala │ │ │ │ └── FlowersSwagger.scala │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── web.xml │ │ └── test │ │ └── scala │ │ └── org │ │ └── scalatra │ │ └── example │ │ └── swagger │ │ └── FlowersSpec.scala └── views │ └── scalatra-twirl │ ├── .gitignore │ ├── README.md │ ├── build.sbt │ ├── project │ ├── build.properties │ └── plugins.sbt │ ├── sbt │ └── src │ ├── main │ ├── resources │ │ └── logback.xml │ ├── scala │ │ ├── ScalatraBootstrap.scala │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── ScalatraTwirlServlet.scala │ ├── twirl │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── hello.scala.html │ └── webapp │ │ └── WEB-INF │ │ └── web.xml │ └── test │ └── scala │ └── com │ └── example │ └── TwirlExampleSpec.scala ├── 3.0 ├── async │ └── pekko-examples │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ ├── logback.xml │ │ │ └── rebel.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── app │ │ │ │ ├── FutureController.scala │ │ │ │ └── MyActorApp.scala │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── web.xml │ │ └── test │ │ └── scala │ │ └── com │ │ └── example │ │ └── app │ │ ├── FutureControllerSpec.scala │ │ └── MyActorAppSpec.scala ├── formats │ └── scalatra-forms │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ ├── logback.xml │ │ │ └── rebel.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ └── forms │ │ │ │ └── FormsController.scala │ │ ├── twirl │ │ │ ├── form.scala.html │ │ │ └── result.scala.html │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ └── web.xml │ │ │ ├── css │ │ │ ├── bootstrap-theme.css │ │ │ ├── bootstrap-theme.css.map │ │ │ ├── bootstrap-theme.min.css │ │ │ ├── bootstrap-theme.min.css.map │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ ├── bootstrap.min.css │ │ │ └── bootstrap.min.css.map │ │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ └── js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ └── npm.js │ │ └── test │ │ └── scala │ │ └── org │ │ └── scalatra │ │ └── example │ │ └── forms │ │ └── FormsControllerSpec.scala ├── http │ ├── authentication-demo │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ ├── AuthDemo.scala │ │ │ │ │ └── AuthenticationSupport.scala │ │ │ └── webapp │ │ │ │ └── WEB-INF │ │ │ │ └── web.xml │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── AuthDemoSpec.scala │ ├── scalatra-gzip │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ └── GZipApp.scala │ │ │ └── webapp │ │ │ │ └── WEB-INF │ │ │ │ └── web.xml │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── GZipSpec.scala │ ├── scalatra-http-demo │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── example │ │ │ │ │ ├── CookiesExample.scala │ │ │ │ │ ├── FileUploadExample.scala │ │ │ │ │ ├── FilterExample.scala │ │ │ │ │ └── HttpExample.scala │ │ │ └── webapp │ │ │ │ ├── WEB-INF │ │ │ │ └── web.xml │ │ │ │ └── assets │ │ │ │ ├── css │ │ │ │ ├── bootstrap-responsive.css │ │ │ │ ├── bootstrap-responsive.min.css │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.min.css │ │ │ │ ├── scalatra.css │ │ │ │ └── syntax.css │ │ │ │ ├── img │ │ │ │ ├── back_pattern.png │ │ │ │ ├── glyphicons-halflings-white.png │ │ │ │ ├── glyphicons-halflings.png │ │ │ │ ├── logo-s.png │ │ │ │ ├── logo-x.png │ │ │ │ ├── scalatra_logo.png │ │ │ │ └── skeletal_weave.png │ │ │ │ └── js │ │ │ │ ├── bootstrap.js │ │ │ │ ├── bootstrap.min.js │ │ │ │ └── jquery.min.js │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── HttpExampleSpec.scala │ └── scentry-auth-demo │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ └── logback.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── com │ │ │ │ └── constructiveproof │ │ │ │ └── example │ │ │ │ ├── ProtectedController.scala │ │ │ │ ├── SessionsController.scala │ │ │ │ ├── auth │ │ │ │ ├── AuthenticationSupport.scala │ │ │ │ └── strategies │ │ │ │ │ ├── RememberMeStrategy.scala │ │ │ │ │ └── UserPasswordStrategy.scala │ │ │ │ └── models │ │ │ │ └── User.scala │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── web.xml │ │ └── test │ │ └── scala │ │ └── com │ │ └── constructiveproof │ │ └── example │ │ ├── ScentryAuthFailureSpec.scala │ │ └── ScentryAuthSuccessSpec.scala ├── persistence │ ├── scalatra-slick │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ │ ├── build.properties │ │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ │ ├── main │ │ │ ├── resources │ │ │ │ ├── c3p0.properties │ │ │ │ └── logback.xml │ │ │ ├── scala │ │ │ │ ├── ScalatraBootstrap.scala │ │ │ │ └── org │ │ │ │ │ └── scalatra │ │ │ │ │ └── slickexample │ │ │ │ │ └── SlickApp.scala │ │ │ └── webapp │ │ │ │ └── WEB-INF │ │ │ │ └── web.xml │ │ │ └── test │ │ │ └── scala │ │ │ └── org │ │ │ └── scalatra │ │ │ └── slickexample │ │ │ └── SlickAppSpec.scala │ └── scalatra-squeryl │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.sbt │ │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ │ ├── sbt │ │ └── src │ │ ├── main │ │ ├── resources │ │ │ └── logback.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ ├── ArticlesController.scala │ │ │ │ ├── init │ │ │ │ ├── DatabaseInit.scala │ │ │ │ └── DatabaseSessionSupport.scala │ │ │ │ └── models │ │ │ │ └── BlogDb.scala │ │ ├── twirl │ │ │ ├── form.scala.html │ │ │ ├── index.scala.html │ │ │ └── layout.scala.html │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── layouts │ │ │ │ └── default.ssp │ │ │ ├── views │ │ │ │ └── articles │ │ │ │ │ ├── index.ssp │ │ │ │ │ └── new.ssp │ │ │ └── web.xml │ │ │ ├── css │ │ │ ├── bootstrap-responsive.css │ │ │ ├── bootstrap-responsive.min.css │ │ │ ├── bootstrap.css │ │ │ └── bootstrap.min.css │ │ │ ├── favicon.ico │ │ │ ├── img │ │ │ ├── glyphicons-halflings-white.png │ │ │ └── glyphicons-halflings.png │ │ │ └── js │ │ │ ├── angular-1.0.1.js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ └── jquery.min.js │ │ └── test │ │ └── scala │ │ └── org │ │ └── scalatra │ │ └── example │ │ └── ArticlesControllerSpec.scala ├── swagger-example │ ├── .gitignore │ ├── README.md │ ├── build.sbt │ ├── project │ │ ├── build.properties │ │ └── plugins.sbt │ ├── sbt │ └── src │ │ ├── main │ │ ├── resources │ │ │ └── logback.xml │ │ ├── scala │ │ │ ├── ScalatraBootstrap.scala │ │ │ └── org │ │ │ │ └── scalatra │ │ │ │ └── example │ │ │ │ └── swagger │ │ │ │ ├── FlowersController.scala │ │ │ │ └── FlowersSwagger.scala │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── web.xml │ │ └── test │ │ └── scala │ │ └── org │ │ └── scalatra │ │ └── example │ │ └── swagger │ │ └── FlowersSpec.scala └── views │ └── scalatra-twirl │ ├── .gitignore │ ├── README.md │ ├── build.sbt │ ├── project │ ├── build.properties │ └── plugins.sbt │ ├── sbt │ └── src │ ├── main │ ├── resources │ │ └── logback.xml │ ├── scala │ │ ├── ScalatraBootstrap.scala │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── ScalatraTwirlServlet.scala │ ├── twirl │ │ └── org │ │ │ └── scalatra │ │ │ └── example │ │ │ └── hello.scala.html │ └── webapp │ │ └── WEB-INF │ │ └── web.xml │ └── test │ └── scala │ └── com │ └── example │ └── TwirlExampleSpec.scala ├── README.md └── buildall.bash /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "weekly" 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .classpath 2 | *.sublime-* 3 | *~ 4 | .cache 5 | .idea/ 6 | .idea_modules/ 7 | .project 8 | .settings/ 9 | *.iml 10 | *.stackdump 11 | project/target/ 12 | target/ 13 | .metals 14 | metals.sbt 15 | .bloop 16 | .vscode 17 | .bsp 18 | -------------------------------------------------------------------------------- /2.3/async/akka-examples/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.5 2 | 3 | -------------------------------------------------------------------------------- /2.3/async/akka-examples/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | 3 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.3.5") 4 | -------------------------------------------------------------------------------- /2.3/async/akka-examples/src/main/webapp/WEB-INF/layouts/default.scaml: -------------------------------------------------------------------------------- 1 | -@ val title: String 2 | -@ val headline: String = title 3 | -@ val body: String 4 | 5 | !!! 6 | %html 7 | %head 8 | %title= title 9 | %body 10 | #content 11 | %h1= headline 12 | != body 13 | -------------------------------------------------------------------------------- /2.3/async/akka-examples/src/main/webapp/WEB-INF/views/hello-scalate.scaml: -------------------------------------------------------------------------------- 1 | - attributes("title") = "Scalatra: a tiny, Sinatra-like web framework for Scala" 2 | - attributes("headline") = "Welcome to Scalatra" 3 | 4 | Hello, Scalate! 5 | -------------------------------------------------------------------------------- /2.3/async/scalatra-atmosphere-embedded/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.5 2 | -------------------------------------------------------------------------------- /2.3/async/scalatra-atmosphere-embedded/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | 3 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.3.5") 4 | 5 | addSbtPlugin("com.typesafe.sbt" % "sbt-start-script" % "0.10.0") 6 | -------------------------------------------------------------------------------- /2.3/async/scalatra-atmosphere-embedded/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example.atmosphere._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new ChatController, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.3/async/scalatra-atmosphere-embedded/src/main/webapp/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.3/async/scalatra-atmosphere-embedded/src/main/webapp/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /2.3/async/scalatra-atmosphere-embedded/src/main/webapp/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.3/async/scalatra-atmosphere-embedded/src/main/webapp/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /2.3/async/scalatra-atmosphere-example/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.5 2 | -------------------------------------------------------------------------------- /2.3/async/scalatra-atmosphere-example/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | 3 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.3.5") 4 | -------------------------------------------------------------------------------- /2.3/async/scalatra-atmosphere-example/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example.atmosphere._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new ChatController, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.3/async/scalatra-atmosphere-example/src/main/webapp/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.3/async/scalatra-atmosphere-example/src/main/webapp/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /2.3/async/scalatra-atmosphere-example/src/main/webapp/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.3/async/scalatra-atmosphere-example/src/main/webapp/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /2.3/deployment/scalatra-heroku/Procfile: -------------------------------------------------------------------------------- 1 | web: target/universal/stage/bin/heroku-example -Dhttp.port=$PORT 2 | -------------------------------------------------------------------------------- /2.3/deployment/scalatra-heroku/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.5 2 | -------------------------------------------------------------------------------- /2.3/deployment/scalatra-heroku/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | 3 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.3.5") 4 | 5 | addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.0-RC1") 6 | -------------------------------------------------------------------------------- /2.3/deployment/scalatra-heroku/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new HerokuApp, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.3/deployment/scalatra-heroku/src/main/scala/org/scalatra/example/HerokuApp.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | import scalate.ScalateSupport 5 | 6 | class HerokuApp extends HerokuExampleStack { 7 | 8 | get("/") { 9 | 10 | 11 |

Hello, world!

12 | Say hello to Scalate. 13 | 14 | 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /2.3/deployment/scalatra-heroku/src/main/webapp/WEB-INF/templates/layouts/default.jade: -------------------------------------------------------------------------------- 1 | -@ val title: String 2 | -@ val headline: String = title 3 | -@ val body: String 4 | 5 | !!! 6 | html 7 | head 8 | title= title 9 | body 10 | #content 11 | h1= headline 12 | != body 13 | -------------------------------------------------------------------------------- /2.3/deployment/scalatra-heroku/src/main/webapp/WEB-INF/templates/views/hello-scalate.jade: -------------------------------------------------------------------------------- 1 | - attributes("title") = "Scalatra: a tiny, Sinatra-like web framework for Scala" 2 | - attributes("headline") = "Welcome to Scalatra" 3 | 4 | p= "Hello, Scalate!" 5 | -------------------------------------------------------------------------------- /2.3/deployment/scalatra-heroku/system.properties: -------------------------------------------------------------------------------- 1 | java.runtime.version=1.7 2 | -------------------------------------------------------------------------------- /2.3/deployment/scalatra-jelastic/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.5 2 | -------------------------------------------------------------------------------- /2.3/deployment/scalatra-jelastic/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | 3 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.3.5") 4 | 5 | addSbtPlugin("com.github.casualjim" % "sbt-jelastic-deploy" % "0.1.4") 6 | -------------------------------------------------------------------------------- /2.3/deployment/scalatra-jelastic/src/main/scala/JelasticApp.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class JelasticApp extends ScalatraServlet { 6 | 7 | get("/") { 8 | 9 | 10 |

This is 11 | 12 | scalatra-jelastic 13 | ! 14 |

15 | 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /2.3/deployment/scalatra-jelastic/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new JelasticApp, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.3/formats/scalatra-commands/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.5 2 | -------------------------------------------------------------------------------- /2.3/formats/scalatra-commands/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | 3 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.3.5") 4 | -------------------------------------------------------------------------------- /2.3/formats/scalatra-commands/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example.commands._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new TodosController, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.3/formats/scalatra-commands/src/main/scala/org/scalatra/example/databinding/models/Models.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example.commands.models 2 | 3 | /** A Todo object to use as a data model */ 4 | case class Todo(id: Int, name: String, done: Boolean = false) 5 | -------------------------------------------------------------------------------- /2.3/formats/scalatra-commands/src/main/scala/org/scalatra/example/databinding/utils/Logger.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example.commands 2 | package utils 3 | 4 | import grizzled.slf4j.Logger 5 | 6 | trait Logging { 7 | @transient lazy val logger: Logger = Logger(getClass) 8 | } 9 | -------------------------------------------------------------------------------- /2.3/formats/scalatra-commands/src/main/webapp/css/todo.css: -------------------------------------------------------------------------------- 1 | .done-true { 2 | text-decoration: line-through; 3 | color: grey; 4 | } 5 | -------------------------------------------------------------------------------- /2.3/formats/scalatra-commands/src/main/webapp/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.3/formats/scalatra-commands/src/main/webapp/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /2.3/formats/scalatra-commands/src/main/webapp/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.3/formats/scalatra-commands/src/main/webapp/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /2.3/http/authentication-demo/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.5 2 | -------------------------------------------------------------------------------- /2.3/http/authentication-demo/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | 3 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.3.5") 4 | -------------------------------------------------------------------------------- /2.3/http/authentication-demo/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new AuthDemo, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.3/http/authentication-demo/src/main/scala/org/scalatra/example/AuthDemo.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class AuthDemo extends ScalatraServlet with AuthenticationSupport { 6 | 7 | 8 | get("/*") { 9 | basicAuth 10 | 11 | 12 |

Hello from Scalatra

13 |

You are authenticated.

14 | 15 | 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /2.3/http/authentication-demo/src/main/webapp/WEB-INF/layouts/default.scaml: -------------------------------------------------------------------------------- 1 | -@ val title: String 2 | -@ val headline: String = title 3 | -@ val body: String 4 | 5 | !!! 6 | %html 7 | %head 8 | %title= title 9 | %body 10 | #content 11 | %h1= headline 12 | != body 13 | -------------------------------------------------------------------------------- /2.3/http/authentication-demo/src/main/webapp/WEB-INF/views/hello-scalate.scaml: -------------------------------------------------------------------------------- 1 | - attributes("title") = "Scalatra: a tiny, Sinatra-like web framework for Scala" 2 | - attributes("headline") = "Welcome to Scalatra" 3 | 4 | Hello, Scalate! 5 | -------------------------------------------------------------------------------- /2.3/http/scalatra-gzip/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.5 2 | -------------------------------------------------------------------------------- /2.3/http/scalatra-gzip/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | 3 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.3.5") 4 | -------------------------------------------------------------------------------- /2.3/http/scalatra-gzip/src/main/scala/GZipApp.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class GZipApp extends ScalatraServlet with GZipSupport { 6 | 7 | get("/") { 8 | 9 | 10 |

This is 11 | 12 | http/gzip 13 | ! 14 |

15 | 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /2.3/http/scalatra-gzip/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new GZipApp, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.3/http/scalatra-http-client/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.5 2 | -------------------------------------------------------------------------------- /2.3/http/scalatra-http-client/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | 3 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.3.5") 4 | -------------------------------------------------------------------------------- /2.3/http/scalatra-http-client/src/main/scala/DispatchApp.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class DispatchApp extends ScalatraServlet { 6 | 7 | get("/") { 8 | 9 | 10 |

This is 11 | http/http-client! 12 |

13 | 14 | 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /2.3/http/scalatra-http-client/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new DispatchApp, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.3/http/scalatra-http-demo/README.md: -------------------------------------------------------------------------------- 1 | # Scalatra HTTP Demo # 2 | 3 | ## Build & Run ## 4 | 5 | ```sh 6 | $ git clone https://github.com/scalatra/scalatra-website-examples.git 7 | $ cd scalatra-website-examples/2.3/http/scalatra-http-demo 8 | $ chmod +x sbt 9 | $ ./sbt 10 | > container:start 11 | > browse 12 | ``` 13 | 14 | If `browse` doesn't launch your browser, manually open [http://localhost:8080/](http://localhost:8080/) in your browser. 15 | -------------------------------------------------------------------------------- /2.3/http/scalatra-http-demo/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.5 2 | -------------------------------------------------------------------------------- /2.3/http/scalatra-http-demo/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | 3 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.3.5") 4 | -------------------------------------------------------------------------------- /2.3/http/scalatra-http-demo/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new CookiesExample, "/cookies-example") 8 | context.mount(new FileUploadExample, "/upload") 9 | context.mount(new FilterExample, "/") 10 | context.mount(new HttpExample, "/*") 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /2.3/http/scalatra-http-demo/src/main/scala/org/scalatra/example/CookiesExample.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class CookiesExample extends ScalatraServlet { 6 | get("/") { 7 | val previous = cookies.get("counter") match { 8 | case Some(v) => v.toInt 9 | case None => 0 10 | } 11 | cookies.update("counter", (previous+1).toString) 12 |

13 | Hi, you have been on this page {previous} times already 14 |

15 | } 16 | } 17 | -------------------------------------------------------------------------------- /2.3/http/scalatra-http-demo/src/main/webapp/WEB-INF/templates/layouts/default.jade: -------------------------------------------------------------------------------- 1 | -@ val title: String 2 | -@ val headline: String = title 3 | -@ val body: String 4 | 5 | !!! 6 | html 7 | head 8 | title= title 9 | body 10 | #content 11 | h1= headline 12 | != body 13 | -------------------------------------------------------------------------------- /2.3/http/scalatra-http-demo/src/main/webapp/WEB-INF/templates/views/hello-scalate.jade: -------------------------------------------------------------------------------- 1 | - attributes("title") = "Scalatra: a tiny, Sinatra-like web framework for Scala" 2 | - attributes("headline") = "Welcome to Scalatra" 3 | 4 | p= "Hello, Scalate!" 5 | -------------------------------------------------------------------------------- /2.3/http/scalatra-http-demo/src/main/webapp/assets/img/back_pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.3/http/scalatra-http-demo/src/main/webapp/assets/img/back_pattern.png -------------------------------------------------------------------------------- /2.3/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.3/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /2.3/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.3/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /2.3/http/scalatra-http-demo/src/main/webapp/assets/img/logo-s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.3/http/scalatra-http-demo/src/main/webapp/assets/img/logo-s.png -------------------------------------------------------------------------------- /2.3/http/scalatra-http-demo/src/main/webapp/assets/img/logo-x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.3/http/scalatra-http-demo/src/main/webapp/assets/img/logo-x.png -------------------------------------------------------------------------------- /2.3/http/scalatra-http-demo/src/main/webapp/assets/img/scalatra_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.3/http/scalatra-http-demo/src/main/webapp/assets/img/scalatra_logo.png -------------------------------------------------------------------------------- /2.3/http/scalatra-http-demo/src/main/webapp/assets/img/skeletal_weave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.3/http/scalatra-http-demo/src/main/webapp/assets/img/skeletal_weave.png -------------------------------------------------------------------------------- /2.3/http/scentry-auth-demo/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.5 2 | -------------------------------------------------------------------------------- /2.3/http/scentry-auth-demo/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | 3 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.3.5") 4 | -------------------------------------------------------------------------------- /2.3/http/scentry-auth-demo/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import com.constructiveproof.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new ProtectedController, "/*") 8 | context.mount(new SessionsController, "/sessions/*") 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /2.3/http/scentry-auth-demo/src/main/scala/com/constructiveproof/example/models/User.scala: -------------------------------------------------------------------------------- 1 | package com.constructiveproof.example.models 2 | 3 | import org.slf4j.LoggerFactory 4 | 5 | case class User(id:String) { 6 | 7 | val logger = LoggerFactory.getLogger(getClass) 8 | 9 | def forgetMe = { 10 | logger.info("User: this is where you'd invalidate the saved token in you User model") 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /2.3/http/scentry-auth-demo/src/main/webapp/WEB-INF/templates/layouts/default.ssp: -------------------------------------------------------------------------------- 1 | <%@ val body: String %> 2 | 3 | 4 | 5 | <%= unescape(body) %> 6 | 7 | 8 | -------------------------------------------------------------------------------- /2.3/http/scentry-auth-demo/src/main/webapp/WEB-INF/templates/views/sessions/new.ssp: -------------------------------------------------------------------------------- 1 |

Please login:

2 | 3 | 4 |
5 |

6 |
7 |
8 | 9 |

10 |

11 | 12 |

13 |
14 | -------------------------------------------------------------------------------- /2.3/persistence/riak-example/README.md: -------------------------------------------------------------------------------- 1 | # Riak Example # 2 | 3 | ## Build & Run ## 4 | 5 | ```sh 6 | $ cd Riak_Example 7 | $ ./sbt 8 | > container:start 9 | > browse 10 | ``` 11 | 12 | If `browse` doesn't launch your browser, manually open [http://localhost:8080/](http://localhost:8080/) in your browser. 13 | -------------------------------------------------------------------------------- /2.3/persistence/riak-example/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.5 2 | -------------------------------------------------------------------------------- /2.3/persistence/riak-example/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | 3 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.3.5") 4 | -------------------------------------------------------------------------------- /2.3/persistence/riak-example/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle with RiakJavaClientInit { 6 | 7 | override def init(context: ServletContext) { 8 | configureRiakJavaClient() 9 | context.mount(new SimpleRiakController, "/*") 10 | } 11 | 12 | override def destroy(context: ServletContext) { 13 | closeRiakJavaClient() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /2.3/persistence/riak-example/src/main/webapp/WEB-INF/templates/layouts/default.jade: -------------------------------------------------------------------------------- 1 | -@ val title: String 2 | -@ val headline: String = title 3 | -@ val body: String 4 | 5 | !!! 6 | html 7 | head 8 | title= title 9 | body 10 | #content 11 | h1= headline 12 | != body 13 | -------------------------------------------------------------------------------- /2.3/persistence/riak-example/src/main/webapp/WEB-INF/templates/views/hello-scalate.jade: -------------------------------------------------------------------------------- 1 | - attributes("title") = "Scalatra: a tiny, Sinatra-like web framework for Scala" 2 | - attributes("headline") = "Welcome to Scalatra" 3 | 4 | p= "Hello, Scalate!" 5 | -------------------------------------------------------------------------------- /2.3/persistence/scalatra-casbah-example/README.md: -------------------------------------------------------------------------------- 1 | # Scalatra Casbah Example # 2 | 3 | ## Build & Run ## 4 | 5 | ```sh 6 | $ cd Scalatra_Casbah_Example 7 | $ ./sbt 8 | > container:start 9 | > browse 10 | ``` 11 | 12 | If `browse` doesn't launch your browser, manually open [http://localhost:8080/](http://localhost:8080/) in your browser. 13 | -------------------------------------------------------------------------------- /2.3/persistence/scalatra-casbah-example/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.5 2 | -------------------------------------------------------------------------------- /2.3/persistence/scalatra-casbah-example/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | 3 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.3.5") 4 | -------------------------------------------------------------------------------- /2.3/persistence/scalatra-casbah-example/src/main/webapp/WEB-INF/templates/layouts/default.jade: -------------------------------------------------------------------------------- 1 | -@ val title: String 2 | -@ val headline: String = title 3 | -@ val body: String 4 | 5 | !!! 6 | html 7 | head 8 | title= title 9 | body 10 | #content 11 | h1= headline 12 | != body 13 | -------------------------------------------------------------------------------- /2.3/persistence/scalatra-casbah-example/src/main/webapp/WEB-INF/templates/views/hello-scalate.jade: -------------------------------------------------------------------------------- 1 | - attributes("title") = "Scalatra: a tiny, Sinatra-like web framework for Scala" 2 | - attributes("headline") = "Welcome to Scalatra" 3 | 4 | p= "Hello, Scalate!" 5 | -------------------------------------------------------------------------------- /2.3/persistence/scalatra-slick/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | target/ 3 | /.lib/ 4 | .idea 5 | .idea_modules -------------------------------------------------------------------------------- /2.3/persistence/scalatra-slick/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.5 2 | -------------------------------------------------------------------------------- /2.3/persistence/scalatra-slick/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | 3 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.3.5") 4 | -------------------------------------------------------------------------------- /2.3/persistence/scalatra-slick/src/main/resources/c3p0.properties: -------------------------------------------------------------------------------- 1 | c3p0.driverClass=org.h2.Driver 2 | c3p0.jdbcUrl=jdbc:h2:mem:test 3 | c3p0.user=root 4 | c3p0.password= 5 | c3p0.minPoolSize=1 6 | c3p0.acquireIncrement=1 7 | c3p0.maxPoolSize=50 8 | -------------------------------------------------------------------------------- /2.3/persistence/scalatra-squeryl/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.5 2 | -------------------------------------------------------------------------------- /2.3/persistence/scalatra-squeryl/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | 3 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.3.5") 4 | -------------------------------------------------------------------------------- /2.3/persistence/scalatra-squeryl/src/main/webapp/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.3/persistence/scalatra-squeryl/src/main/webapp/favicon.ico -------------------------------------------------------------------------------- /2.3/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.3/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /2.3/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.3/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /2.3/resources/scalatra-coffeescript/build.sbt: -------------------------------------------------------------------------------- 1 | import com.bowlingx.sbt.plugins.Wro4jPlugin._ 2 | import Wro4jKeys._ 3 | 4 | // import task settings 5 | seq(wro4jSettings: _*) 6 | 7 | // If you use xsbt-web-plugin, this will add compiled files to your war file: 8 | (webappResources in Compile) <+= (targetFolder in generateResources in Compile) 9 | -------------------------------------------------------------------------------- /2.3/resources/scalatra-coffeescript/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.5 2 | -------------------------------------------------------------------------------- /2.3/resources/scalatra-coffeescript/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | 3 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.3.5") 4 | 5 | resolvers += Resolver.url("sbt-plugin-snapshots", 6 | new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-snapshots/"))( 7 | Resolver.ivyStylePatterns) 8 | 9 | addSbtPlugin("com.bowlingx" %% "xsbt-wro4j-plugin" % "0.3.5") 10 | -------------------------------------------------------------------------------- /2.3/resources/scalatra-coffeescript/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new CoffeeScriptApp, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.3/resources/scalatra-coffeescript/src/main/webapp/WEB-INF/wro.properties: -------------------------------------------------------------------------------- 1 | preProcessors = coffeeScript 2 | postProcessors = 3 | -------------------------------------------------------------------------------- /2.3/resources/scalatra-coffeescript/src/main/webapp/WEB-INF/wro.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | /coffee/*.coffee 10 | 11 | 12 | -------------------------------------------------------------------------------- /2.3/resources/scalatra-coffeescript/src/main/webapp/coffee/main.coffee: -------------------------------------------------------------------------------- 1 | alert "Hello CoffeeScript!" 2 | -------------------------------------------------------------------------------- /2.3/resources/scalatra-less-css/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.5 2 | -------------------------------------------------------------------------------- /2.3/resources/scalatra-less-css/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | 3 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.3.5") 4 | 5 | resolvers += Resolver.url("sbt-plugin-snapshots", 6 | new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-snapshots/"))( 7 | Resolver.ivyStylePatterns) 8 | 9 | addSbtPlugin("com.bowlingx" %% "xsbt-wro4j-plugin" % "0.3.5") 10 | -------------------------------------------------------------------------------- /2.3/resources/scalatra-less-css/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new LessCssApp, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.3/resources/scalatra-less-css/src/main/webapp/WEB-INF/wro.properties: -------------------------------------------------------------------------------- 1 | preProcessors = lessCss 2 | postProcessors = 3 | -------------------------------------------------------------------------------- /2.3/resources/scalatra-less-css/src/main/webapp/WEB-INF/wro.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | /less/*.less 10 | 11 | 12 | -------------------------------------------------------------------------------- /2.3/resources/scalatra-less-css/src/main/webapp/less/main.less: -------------------------------------------------------------------------------- 1 | @base: #f938ab; 2 | 3 | body { 4 | color: @base 5 | } 6 | -------------------------------------------------------------------------------- /2.3/swagger-example/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.5 2 | -------------------------------------------------------------------------------- /2.3/swagger-example/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | 3 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.3.5") 4 | -------------------------------------------------------------------------------- /2.3/swagger-example/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /2.3/swagger-example/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example.swagger._ 2 | import org.scalatra.LifeCycle 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | 7 | implicit val swagger = new FlowersSwagger 8 | 9 | override def init(context: ServletContext) { 10 | context.mount(new FlowersController, "/flowers", "flowers") 11 | context.mount (new ResourcesApp, "/api-docs") 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /2.3/swagger-example/src/main/webapp/WEB-INF/layouts/default.scaml: -------------------------------------------------------------------------------- 1 | -@ val title: String 2 | -@ val headline: String = title 3 | -@ val body: String 4 | 5 | !!! 6 | %html 7 | %head 8 | %title= title 9 | %body 10 | #content 11 | %h1= headline 12 | != body 13 | -------------------------------------------------------------------------------- /2.3/swagger-example/src/main/webapp/WEB-INF/views/hello-scalate.scaml: -------------------------------------------------------------------------------- 1 | - attributes("title") = "Scalatra: a tiny, Sinatra-like web framework for Scala" 2 | - attributes("headline") = "Welcome to Scalatra" 3 | 4 | Hello, Scalate! 5 | -------------------------------------------------------------------------------- /2.4/async/akka-examples/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.9 2 | -------------------------------------------------------------------------------- /2.4/async/akka-examples/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.4.0") 3 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 4 | -------------------------------------------------------------------------------- /2.4/async/akka-examples/src/main/webapp/WEB-INF/layouts/default.scaml: -------------------------------------------------------------------------------- 1 | -@ val title: String 2 | -@ val headline: String = title 3 | -@ val body: String 4 | 5 | !!! 6 | %html 7 | %head 8 | %title= title 9 | %body 10 | #content 11 | %h1= headline 12 | != body 13 | -------------------------------------------------------------------------------- /2.4/async/akka-examples/src/main/webapp/WEB-INF/views/hello-scalate.scaml: -------------------------------------------------------------------------------- 1 | - attributes("title") = "Scalatra: a tiny, Sinatra-like web framework for Scala" 2 | - attributes("headline") = "Welcome to Scalatra" 3 | 4 | Hello, Scalate! -------------------------------------------------------------------------------- /2.4/async/scalatra-atmosphere-embedded/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.9 2 | -------------------------------------------------------------------------------- /2.4/async/scalatra-atmosphere-embedded/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.4.0") 3 | addSbtPlugin("com.typesafe.sbt" % "sbt-start-script" % "0.10.0") 4 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 5 | -------------------------------------------------------------------------------- /2.4/async/scalatra-atmosphere-embedded/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example.atmosphere._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new ChatController, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.4/async/scalatra-atmosphere-embedded/src/main/webapp/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.4/async/scalatra-atmosphere-embedded/src/main/webapp/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /2.4/async/scalatra-atmosphere-embedded/src/main/webapp/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.4/async/scalatra-atmosphere-embedded/src/main/webapp/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /2.4/async/scalatra-atmosphere-example/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.9 2 | -------------------------------------------------------------------------------- /2.4/async/scalatra-atmosphere-example/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.4.0") 3 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 4 | -------------------------------------------------------------------------------- /2.4/async/scalatra-atmosphere-example/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example.atmosphere._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new ChatController, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.4/async/scalatra-atmosphere-example/src/main/webapp/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.4/async/scalatra-atmosphere-example/src/main/webapp/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /2.4/async/scalatra-atmosphere-example/src/main/webapp/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.4/async/scalatra-atmosphere-example/src/main/webapp/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /2.4/deployment/scalatra-heroku/Procfile: -------------------------------------------------------------------------------- 1 | web: target/universal/stage/bin/heroku-example -Dhttp.port=$PORT 2 | -------------------------------------------------------------------------------- /2.4/deployment/scalatra-heroku/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.9 2 | -------------------------------------------------------------------------------- /2.4/deployment/scalatra-heroku/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.4.0") 3 | addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.6") 4 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 5 | -------------------------------------------------------------------------------- /2.4/deployment/scalatra-heroku/src/main/scala/HerokuApp.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class HerokuApp extends ScalatraServlet { 6 | 7 | get("/") { 8 | 9 | 10 |

This is 11 | 12 | scalatra-heroku 13 | ! 14 |

15 | 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /2.4/deployment/scalatra-heroku/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new HerokuApp, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.4/deployment/scalatra-jelastic/build.sbt: -------------------------------------------------------------------------------- 1 | jelasticSettings 2 | JelasticKeys.email in JelasticKeys.deploy := sys.env.get("JELASTIC_USERNAME").getOrElse( 3 | sys error "Please export JELASTIC_USERNAME in your shell!") 4 | JelasticKeys.password in JelasticKeys.deploy := sys.env.get("JELASTIC_PWD").getOrElse( 5 | sys error "Please export JELASTIC_PWD in your shell!") 6 | JelasticKeys.apiHoster := "app.jelastic.servint.net" 7 | JelasticKeys.environment in JelasticKeys.deploy := "scalatra-test" 8 | publishTo := None 9 | -------------------------------------------------------------------------------- /2.4/deployment/scalatra-jelastic/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.9 2 | -------------------------------------------------------------------------------- /2.4/deployment/scalatra-jelastic/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.3.5") 3 | addSbtPlugin("com.github.casualjim" % "sbt-jelastic-deploy" % "0.1.4") 4 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 5 | -------------------------------------------------------------------------------- /2.4/deployment/scalatra-jelastic/src/main/scala/JelasticApp.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class JelasticApp extends ScalatraServlet { 6 | 7 | get("/") { 8 | 9 | 10 |

This is 11 | 12 | scalatra-jelastic 13 | ! 14 |

15 | 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /2.4/deployment/scalatra-jelastic/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new JelasticApp, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.4/formats/scalatra-commands/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.9 2 | -------------------------------------------------------------------------------- /2.4/formats/scalatra-commands/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.4.0") 3 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 4 | -------------------------------------------------------------------------------- /2.4/formats/scalatra-commands/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example.commands._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new TodosController, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.4/formats/scalatra-commands/src/main/scala/org/scalatra/example/databinding/models/Models.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example.commands.models 2 | 3 | /** A Todo object to use as a data model */ 4 | case class Todo(id: Int, name: String, done: Boolean = false) -------------------------------------------------------------------------------- /2.4/formats/scalatra-commands/src/main/scala/org/scalatra/example/databinding/utils/Logger.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example.commands 2 | package utils 3 | 4 | import grizzled.slf4j.Logger 5 | 6 | trait Logging { 7 | @transient lazy val logger: Logger = Logger(getClass) 8 | } -------------------------------------------------------------------------------- /2.4/formats/scalatra-commands/src/main/webapp/css/todo.css: -------------------------------------------------------------------------------- 1 | .done-true { 2 | text-decoration: line-through; 3 | color: grey; 4 | } -------------------------------------------------------------------------------- /2.4/formats/scalatra-commands/src/main/webapp/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.4/formats/scalatra-commands/src/main/webapp/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /2.4/formats/scalatra-commands/src/main/webapp/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.4/formats/scalatra-commands/src/main/webapp/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /2.4/http/authentication-demo/README.md: -------------------------------------------------------------------------------- 1 | # Authentication Demo # 2 | 3 | Corresponds to the guide at [http://scalatra.org/2.4/guides/http/authentication.html](http://scalatra.org/2.4/guides/http/authentication.html) 4 | 5 | 6 | ## Build & Run ## 7 | 8 | ```sh 9 | $ git clone https://github.com/scalatra/scalatra-website-examples.git 10 | $ cd scalatra-website-examples/2.4/http/authentication-demo 11 | $ sbt 12 | > container:start 13 | ``` 14 | 15 | Go to http://localhost:8080 16 | 17 | -------------------------------------------------------------------------------- /2.4/http/authentication-demo/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.9 2 | -------------------------------------------------------------------------------- /2.4/http/authentication-demo/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.4.0") 3 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 4 | -------------------------------------------------------------------------------- /2.4/http/authentication-demo/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new AuthDemo, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.4/http/authentication-demo/src/main/scala/org/scalatra/example/AuthDemo.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class AuthDemo extends ScalatraServlet with AuthenticationSupport { 6 | 7 | 8 | get("/*") { 9 | basicAuth 10 | 11 | 12 |

Hello from Scalatra

13 |

You are authenticated.

14 | 15 | 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /2.4/http/scalatra-gzip/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.9 2 | -------------------------------------------------------------------------------- /2.4/http/scalatra-gzip/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.4.0") 3 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 4 | -------------------------------------------------------------------------------- /2.4/http/scalatra-gzip/src/main/scala/GZipApp.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class GZipApp extends ScalatraServlet with GZipSupport { 6 | 7 | get("/") { 8 | 9 | 10 |

This is 11 | 12 | http/gzip 13 | ! 14 |

15 | 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /2.4/http/scalatra-gzip/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new GZipApp, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.4/http/scalatra-http-client/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.9 2 | -------------------------------------------------------------------------------- /2.4/http/scalatra-http-client/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.4.0") 3 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 4 | -------------------------------------------------------------------------------- /2.4/http/scalatra-http-client/src/main/scala/DispatchApp.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class DispatchApp extends ScalatraServlet { 6 | 7 | get("/") { 8 | 9 | 10 |

This is 11 | http/http-client! 12 |

13 | 14 | 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /2.4/http/scalatra-http-client/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new DispatchApp, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.4/http/scalatra-http-demo/README.md: -------------------------------------------------------------------------------- 1 | # Scalatra HTTP Demo # 2 | 3 | ## Build & Run ## 4 | 5 | ```sh 6 | $ git clone https://github.com/scalatra/scalatra-website-examples.git 7 | $ cd scalatra-website-examples/2.4/http/scalatra-http-demo 8 | $ chmod +x sbt 9 | $ ./sbt 10 | > container:start 11 | > browse 12 | ``` 13 | 14 | If `browse` doesn't launch your browser, manually open [http://localhost:8080/](http://localhost:8080/) in your browser. 15 | -------------------------------------------------------------------------------- /2.4/http/scalatra-http-demo/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.9 2 | -------------------------------------------------------------------------------- /2.4/http/scalatra-http-demo/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.4.0") 3 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 4 | -------------------------------------------------------------------------------- /2.4/http/scalatra-http-demo/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new CookiesExample, "/cookies-example") 8 | context.mount(new FileUploadExample, "/upload") 9 | context.mount(new FilterExample, "/") 10 | context.mount(new HttpExample, "/*") 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /2.4/http/scalatra-http-demo/src/main/scala/org/scalatra/example/CookiesExample.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class CookiesExample extends ScalatraServlet { 6 | get("/") { 7 | val previous = cookies.get("counter") match { 8 | case Some(v) => v.toInt 9 | case None => 0 10 | } 11 | cookies.update("counter", (previous+1).toString) 12 |

13 | Hi, you have been on this page {previous} times already 14 |

15 | } 16 | } 17 | -------------------------------------------------------------------------------- /2.4/http/scalatra-http-demo/src/main/webapp/WEB-INF/templates/layouts/default.jade: -------------------------------------------------------------------------------- 1 | -@ val title: String 2 | -@ val headline: String = title 3 | -@ val body: String 4 | 5 | !!! 6 | html 7 | head 8 | title= title 9 | body 10 | #content 11 | h1= headline 12 | != body 13 | -------------------------------------------------------------------------------- /2.4/http/scalatra-http-demo/src/main/webapp/WEB-INF/templates/views/hello-scalate.jade: -------------------------------------------------------------------------------- 1 | - attributes("title") = "Scalatra: a tiny, Sinatra-like web framework for Scala" 2 | - attributes("headline") = "Welcome to Scalatra" 3 | 4 | p= "Hello, Scalate!" -------------------------------------------------------------------------------- /2.4/http/scalatra-http-demo/src/main/webapp/assets/img/back_pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.4/http/scalatra-http-demo/src/main/webapp/assets/img/back_pattern.png -------------------------------------------------------------------------------- /2.4/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.4/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /2.4/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.4/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /2.4/http/scalatra-http-demo/src/main/webapp/assets/img/logo-s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.4/http/scalatra-http-demo/src/main/webapp/assets/img/logo-s.png -------------------------------------------------------------------------------- /2.4/http/scalatra-http-demo/src/main/webapp/assets/img/logo-x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.4/http/scalatra-http-demo/src/main/webapp/assets/img/logo-x.png -------------------------------------------------------------------------------- /2.4/http/scalatra-http-demo/src/main/webapp/assets/img/scalatra_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.4/http/scalatra-http-demo/src/main/webapp/assets/img/scalatra_logo.png -------------------------------------------------------------------------------- /2.4/http/scalatra-http-demo/src/main/webapp/assets/img/skeletal_weave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.4/http/scalatra-http-demo/src/main/webapp/assets/img/skeletal_weave.png -------------------------------------------------------------------------------- /2.4/http/scentry-auth-demo/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.9 2 | -------------------------------------------------------------------------------- /2.4/http/scentry-auth-demo/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.4.0") 3 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 4 | -------------------------------------------------------------------------------- /2.4/http/scentry-auth-demo/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import com.constructiveproof.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new ProtectedController, "/*") 8 | context.mount(new SessionsController, "/sessions/*") 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /2.4/http/scentry-auth-demo/src/main/scala/com/constructiveproof/example/models/User.scala: -------------------------------------------------------------------------------- 1 | package com.constructiveproof.example.models 2 | 3 | import org.slf4j.LoggerFactory 4 | 5 | case class User(id:String) { 6 | 7 | val logger = LoggerFactory.getLogger(getClass) 8 | 9 | def forgetMe = { 10 | logger.info("User: this is where you'd invalidate the saved token in you User model") 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /2.4/http/scentry-auth-demo/src/main/webapp/WEB-INF/templates/layouts/default.ssp: -------------------------------------------------------------------------------- 1 | <%@ val body: String %> 2 | 3 | 4 | 5 | <%= unescape(body) %> 6 | 7 | -------------------------------------------------------------------------------- /2.4/http/scentry-auth-demo/src/main/webapp/WEB-INF/templates/views/sessions/new.ssp: -------------------------------------------------------------------------------- 1 |

Please login:

2 | 3 | 4 |
5 |

6 |
7 |
8 | 9 |

10 |

11 | 12 |

13 |
-------------------------------------------------------------------------------- /2.4/persistence/riak-example/README.md: -------------------------------------------------------------------------------- 1 | # Riak Example # 2 | 3 | ## Build & Run ## 4 | 5 | ```sh 6 | $ cd Riak_Example 7 | $ ./sbt 8 | > container:start 9 | > browse 10 | ``` 11 | 12 | If `browse` doesn't launch your browser, manually open [http://localhost:8080/](http://localhost:8080/) in your browser. 13 | -------------------------------------------------------------------------------- /2.4/persistence/riak-example/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.9 2 | -------------------------------------------------------------------------------- /2.4/persistence/riak-example/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | 3 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.3.5") 4 | -------------------------------------------------------------------------------- /2.4/persistence/riak-example/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle with RiakJavaClientInit { 6 | 7 | override def init(context: ServletContext) { 8 | configureRiakJavaClient() 9 | context.mount(new SimpleRiakController, "/*") 10 | } 11 | 12 | override def destroy(context: ServletContext) { 13 | closeRiakJavaClient() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /2.4/persistence/riak-example/src/main/webapp/WEB-INF/templates/layouts/default.jade: -------------------------------------------------------------------------------- 1 | -@ val title: String 2 | -@ val headline: String = title 3 | -@ val body: String 4 | 5 | !!! 6 | html 7 | head 8 | title= title 9 | body 10 | #content 11 | h1= headline 12 | != body 13 | -------------------------------------------------------------------------------- /2.4/persistence/riak-example/src/main/webapp/WEB-INF/templates/views/hello-scalate.jade: -------------------------------------------------------------------------------- 1 | - attributes("title") = "Scalatra: a tiny, Sinatra-like web framework for Scala" 2 | - attributes("headline") = "Welcome to Scalatra" 3 | 4 | p= "Hello, Scalate!" -------------------------------------------------------------------------------- /2.4/persistence/scalatra-casbah-example/README.md: -------------------------------------------------------------------------------- 1 | # Scalatra Casbah Example # 2 | 3 | ## Build & Run ## 4 | 5 | ```sh 6 | $ cd Scalatra_Casbah_Example 7 | $ ./sbt 8 | > container:start 9 | > browse 10 | ``` 11 | 12 | If `browse` doesn't launch your browser, manually open [http://localhost:8080/](http://localhost:8080/) in your browser. 13 | -------------------------------------------------------------------------------- /2.4/persistence/scalatra-casbah-example/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.9 2 | -------------------------------------------------------------------------------- /2.4/persistence/scalatra-casbah-example/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.4.0") 3 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 4 | -------------------------------------------------------------------------------- /2.4/persistence/scalatra-casbah-example/src/main/webapp/WEB-INF/templates/layouts/default.jade: -------------------------------------------------------------------------------- 1 | -@ val title: String 2 | -@ val headline: String = title 3 | -@ val body: String 4 | 5 | !!! 6 | html 7 | head 8 | title= title 9 | body 10 | #content 11 | h1= headline 12 | != body 13 | -------------------------------------------------------------------------------- /2.4/persistence/scalatra-casbah-example/src/main/webapp/WEB-INF/templates/views/hello-scalate.jade: -------------------------------------------------------------------------------- 1 | - attributes("title") = "Scalatra: a tiny, Sinatra-like web framework for Scala" 2 | - attributes("headline") = "Welcome to Scalatra" 3 | 4 | p= "Hello, Scalate!" -------------------------------------------------------------------------------- /2.4/persistence/scalatra-slick/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | target/ 3 | /.lib/ 4 | .idea 5 | .idea_modules -------------------------------------------------------------------------------- /2.4/persistence/scalatra-slick/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.9 2 | -------------------------------------------------------------------------------- /2.4/persistence/scalatra-slick/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.4.0") 3 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 4 | -------------------------------------------------------------------------------- /2.4/persistence/scalatra-slick/src/main/resources/c3p0.properties: -------------------------------------------------------------------------------- 1 | c3p0.driverClass=org.h2.Driver 2 | c3p0.jdbcUrl=jdbc:h2:mem:test 3 | c3p0.user=root 4 | c3p0.password= 5 | c3p0.minPoolSize=1 6 | c3p0.acquireIncrement=1 7 | c3p0.maxPoolSize=50 8 | -------------------------------------------------------------------------------- /2.4/persistence/scalatra-squeryl/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.9 2 | -------------------------------------------------------------------------------- /2.4/persistence/scalatra-squeryl/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.4.0") 3 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 4 | -------------------------------------------------------------------------------- /2.4/persistence/scalatra-squeryl/src/main/webapp/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.4/persistence/scalatra-squeryl/src/main/webapp/favicon.ico -------------------------------------------------------------------------------- /2.4/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.4/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /2.4/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.4/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /2.4/resources/scalatra-coffeescript/build.sbt: -------------------------------------------------------------------------------- 1 | import com.bowlingx.sbt.plugins.Wro4jPlugin._ 2 | import Wro4jKeys._ 3 | 4 | // import task settings 5 | seq(wro4jSettings: _*) 6 | 7 | // If you use xsbt-web-plugin, this will add compiled files to your war file: 8 | (webappResources in Compile) <+= (targetFolder in generateResources in Compile) 9 | -------------------------------------------------------------------------------- /2.4/resources/scalatra-coffeescript/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.9 2 | -------------------------------------------------------------------------------- /2.4/resources/scalatra-coffeescript/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.3.5") 3 | addSbtPlugin("com.bowlingx" %% "xsbt-wro4j-plugin" % "0.3.5") 4 | 5 | resolvers += Resolver.url("sbt-plugin-snapshots", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-snapshots/"))(Resolver.ivyStylePatterns) 6 | -------------------------------------------------------------------------------- /2.4/resources/scalatra-coffeescript/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new CoffeeScriptApp, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.4/resources/scalatra-coffeescript/src/main/webapp/WEB-INF/wro.properties: -------------------------------------------------------------------------------- 1 | preProcessors = coffeeScript 2 | postProcessors = -------------------------------------------------------------------------------- /2.4/resources/scalatra-coffeescript/src/main/webapp/WEB-INF/wro.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | /coffee/*.coffee 10 | 11 | 12 | -------------------------------------------------------------------------------- /2.4/resources/scalatra-coffeescript/src/main/webapp/coffee/main.coffee: -------------------------------------------------------------------------------- 1 | alert "Hello CoffeeScript!" -------------------------------------------------------------------------------- /2.4/resources/scalatra-less-css/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.9 2 | -------------------------------------------------------------------------------- /2.4/resources/scalatra-less-css/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.3.5") 3 | addSbtPlugin("com.bowlingx" %% "xsbt-wro4j-plugin" % "0.3.5") 4 | 5 | resolvers += Resolver.url("sbt-plugin-snapshots", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-snapshots/"))(Resolver.ivyStylePatterns) 6 | -------------------------------------------------------------------------------- /2.4/resources/scalatra-less-css/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new LessCssApp, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.4/resources/scalatra-less-css/src/main/webapp/WEB-INF/wro.properties: -------------------------------------------------------------------------------- 1 | preProcessors = lessCss 2 | postProcessors = -------------------------------------------------------------------------------- /2.4/resources/scalatra-less-css/src/main/webapp/WEB-INF/wro.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | /less/*.less 10 | 11 | 12 | -------------------------------------------------------------------------------- /2.4/resources/scalatra-less-css/src/main/webapp/less/main.less: -------------------------------------------------------------------------------- 1 | @base: #f938ab; 2 | 3 | body { 4 | color: @base 5 | } -------------------------------------------------------------------------------- /2.4/swagger-example/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.9 2 | -------------------------------------------------------------------------------- /2.4/swagger-example/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.5.0") 2 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.4.0") 3 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 4 | -------------------------------------------------------------------------------- /2.4/swagger-example/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /2.4/swagger-example/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example.swagger._ 2 | import org.scalatra.LifeCycle 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | 7 | implicit val swagger = new FlowersSwagger 8 | 9 | override def init(context: ServletContext) { 10 | context.mount(new FlowersController, "/flowers", "flowers") 11 | context.mount (new ResourcesApp, "/api-docs") 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /2.4/swagger-example/src/main/webapp/WEB-INF/layouts/default.scaml: -------------------------------------------------------------------------------- 1 | -@ val title: String 2 | -@ val headline: String = title 3 | -@ val body: String 4 | 5 | !!! 6 | %html 7 | %head 8 | %title= title 9 | %body 10 | #content 11 | %h1= headline 12 | != body 13 | -------------------------------------------------------------------------------- /2.4/swagger-example/src/main/webapp/WEB-INF/views/hello-scalate.scaml: -------------------------------------------------------------------------------- 1 | - attributes("title") = "Scalatra: a tiny, Sinatra-like web framework for Scala" 2 | - attributes("headline") = "Welcome to Scalatra" 3 | 4 | Hello, Scalate! -------------------------------------------------------------------------------- /2.5/async/akka-examples/README.md: -------------------------------------------------------------------------------- 1 | # akka-examples # 2 | 3 | Corresponds to the guide at [http://scalatra.org/guides/2.5/async/akka.html](http://scalatra.org/guides/2.5/async/akka.html) 4 | 5 | ## Build & Run ## 6 | 7 | ```sh 8 | $ git clone https://github.com/scalatra/scalatra-website-examples.git 9 | $ cd scalatra-website-examples/2.5/async/akka-examples 10 | $ chmod +x sbt 11 | $ ./sbt ~jetty:start 12 | ``` 13 | 14 | Open [http://localhost:8080/](http://localhost:8080/) in your browser. 15 | -------------------------------------------------------------------------------- /2.5/async/akka-examples/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.15 2 | -------------------------------------------------------------------------------- /2.5/async/akka-examples/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.5.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.5/async/akka-examples/src/main/webapp/WEB-INF/layouts/default.scaml: -------------------------------------------------------------------------------- 1 | -@ val title: String 2 | -@ val headline: String = title 3 | -@ val body: String 4 | 5 | !!! 6 | %html 7 | %head 8 | %title= title 9 | %body 10 | #content 11 | %h1= headline 12 | != body 13 | -------------------------------------------------------------------------------- /2.5/async/akka-examples/src/main/webapp/WEB-INF/views/hello-scalate.scaml: -------------------------------------------------------------------------------- 1 | - attributes("title") = "Scalatra: a tiny, Sinatra-like web framework for Scala" 2 | - attributes("headline") = "Welcome to Scalatra" 3 | 4 | Hello, Scalate! -------------------------------------------------------------------------------- /2.5/async/scalatra-atmosphere-embedded/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.15 2 | -------------------------------------------------------------------------------- /2.5/async/scalatra-atmosphere-embedded/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.5.1") 2 | addSbtPlugin("com.typesafe.sbt" % "sbt-start-script" % "0.10.0") 3 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 4 | -------------------------------------------------------------------------------- /2.5/async/scalatra-atmosphere-embedded/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example.atmosphere._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new ChatController, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.5/async/scalatra-atmosphere-embedded/src/main/webapp/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.5/async/scalatra-atmosphere-embedded/src/main/webapp/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /2.5/async/scalatra-atmosphere-embedded/src/main/webapp/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.5/async/scalatra-atmosphere-embedded/src/main/webapp/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /2.5/async/scalatra-atmosphere-example/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.15 2 | -------------------------------------------------------------------------------- /2.5/async/scalatra-atmosphere-example/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.5.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.5/async/scalatra-atmosphere-example/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example.atmosphere._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new ChatController, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.5/async/scalatra-atmosphere-example/src/main/webapp/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.5/async/scalatra-atmosphere-example/src/main/webapp/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /2.5/async/scalatra-atmosphere-example/src/main/webapp/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.5/async/scalatra-atmosphere-example/src/main/webapp/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /2.5/deployment/scalatra-heroku/Procfile: -------------------------------------------------------------------------------- 1 | web: target/universal/stage/bin/heroku-example -Dhttp.port=$PORT 2 | -------------------------------------------------------------------------------- /2.5/deployment/scalatra-heroku/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.15 2 | -------------------------------------------------------------------------------- /2.5/deployment/scalatra-heroku/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.5.1") 2 | addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.2.0") 3 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 4 | -------------------------------------------------------------------------------- /2.5/deployment/scalatra-heroku/src/main/scala/HerokuApp.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class HerokuApp extends ScalatraServlet { 6 | 7 | get("/") { 8 | 9 | 10 |

This is 11 | 12 | scalatra-heroku 13 | ! 14 |

15 | 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /2.5/deployment/scalatra-heroku/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new HerokuApp, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.5/formats/scalatra-commands/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.15 2 | -------------------------------------------------------------------------------- /2.5/formats/scalatra-commands/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.5.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.5/formats/scalatra-commands/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example.commands._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new TodosController, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.5/formats/scalatra-commands/src/main/scala/org/scalatra/example/databinding/models/Models.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example.commands.models 2 | 3 | /** A Todo object to use as a data model */ 4 | case class Todo(id: Int, name: String, done: Boolean = false) -------------------------------------------------------------------------------- /2.5/formats/scalatra-commands/src/main/scala/org/scalatra/example/databinding/utils/Logger.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example.commands 2 | package utils 3 | 4 | import grizzled.slf4j.Logger 5 | 6 | trait Logging { 7 | @transient lazy val logger: Logger = Logger(getClass) 8 | } -------------------------------------------------------------------------------- /2.5/formats/scalatra-commands/src/main/webapp/css/todo.css: -------------------------------------------------------------------------------- 1 | .done-true { 2 | text-decoration: line-through; 3 | color: grey; 4 | } -------------------------------------------------------------------------------- /2.5/formats/scalatra-commands/src/main/webapp/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.5/formats/scalatra-commands/src/main/webapp/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /2.5/formats/scalatra-commands/src/main/webapp/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.5/formats/scalatra-commands/src/main/webapp/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /2.5/http/authentication-demo/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.15 2 | -------------------------------------------------------------------------------- /2.5/http/authentication-demo/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.5.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.5/http/authentication-demo/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new AuthDemo, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.5/http/authentication-demo/src/main/scala/org/scalatra/example/AuthDemo.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class AuthDemo extends ScalatraServlet with AuthenticationSupport { 6 | 7 | 8 | get("/*") { 9 | basicAuth 10 | 11 | 12 |

Hello from Scalatra

13 |

You are authenticated.

14 | 15 | 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /2.5/http/scalatra-gzip/README.md: -------------------------------------------------------------------------------- 1 | # scalatra-gzip # 2 | 3 | Corresponds to the guide at [http://scalatra.org/guides/2.5/http/gzip.html](http://scalatra.org/guides/2.5/http/gzip.html). 4 | 5 | ## Build & Run ## 6 | 7 | ```sh 8 | $ git clone https://github.com/scalatra/scalatra-website-examples.git 9 | $ cd scalatra-website-examples/2.5/http/scalatra-gzip 10 | $ chmod +x sbt 11 | $ ./sbt ~jetty:start 12 | ``` 13 | 14 | Open [http://localhost:8080/](http://localhost:8080/) in your browser. 15 | -------------------------------------------------------------------------------- /2.5/http/scalatra-gzip/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.15 2 | -------------------------------------------------------------------------------- /2.5/http/scalatra-gzip/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.5.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.5/http/scalatra-gzip/src/main/scala/GZipApp.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class GZipApp extends ScalatraServlet with ContentEncodingSupport { 6 | 7 | get("/") { 8 | 9 | 10 |

This is 11 | 12 | http/gzip 13 | ! 14 |

15 | 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /2.5/http/scalatra-gzip/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new GZipApp, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.5/http/scalatra-http-demo/README.md: -------------------------------------------------------------------------------- 1 | # Scalatra HTTP Demo # 2 | 3 | ## Build & Run ## 4 | 5 | ```sh 6 | $ git clone https://github.com/scalatra/scalatra-website-examples.git 7 | $ cd scalatra-website-examples/2.5/http/scalatra-http-demo 8 | $ chmod +x sbt 9 | $ ./sbt ~jetty:start 10 | ``` 11 | 12 | Open [http://localhost:8080/](http://localhost:8080/) in your browser. 13 | -------------------------------------------------------------------------------- /2.5/http/scalatra-http-demo/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.15 2 | -------------------------------------------------------------------------------- /2.5/http/scalatra-http-demo/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.5.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.5/http/scalatra-http-demo/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new CookiesExample, "/cookies-example") 8 | context.mount(new FileUploadExample, "/upload") 9 | context.mount(new FilterExample, "/") 10 | context.mount(new HttpExample, "/*") 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /2.5/http/scalatra-http-demo/src/main/scala/org/scalatra/example/CookiesExample.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class CookiesExample extends ScalatraServlet { 6 | get("/") { 7 | val previous = cookies.get("counter") match { 8 | case Some(v) => v.toInt 9 | case None => 0 10 | } 11 | cookies.update("counter", (previous+1).toString) 12 |

13 | Hi, you have been on this page {previous} times already 14 |

15 | } 16 | } 17 | -------------------------------------------------------------------------------- /2.5/http/scalatra-http-demo/src/main/webapp/WEB-INF/templates/layouts/default.jade: -------------------------------------------------------------------------------- 1 | -@ val title: String 2 | -@ val headline: String = title 3 | -@ val body: String 4 | 5 | !!! 6 | html 7 | head 8 | title= title 9 | body 10 | #content 11 | h1= headline 12 | != body 13 | -------------------------------------------------------------------------------- /2.5/http/scalatra-http-demo/src/main/webapp/WEB-INF/templates/views/hello-scalate.jade: -------------------------------------------------------------------------------- 1 | - attributes("title") = "Scalatra: a tiny, Sinatra-like web framework for Scala" 2 | - attributes("headline") = "Welcome to Scalatra" 3 | 4 | p= "Hello, Scalate!" -------------------------------------------------------------------------------- /2.5/http/scalatra-http-demo/src/main/webapp/assets/img/back_pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.5/http/scalatra-http-demo/src/main/webapp/assets/img/back_pattern.png -------------------------------------------------------------------------------- /2.5/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.5/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /2.5/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.5/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /2.5/http/scalatra-http-demo/src/main/webapp/assets/img/logo-s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.5/http/scalatra-http-demo/src/main/webapp/assets/img/logo-s.png -------------------------------------------------------------------------------- /2.5/http/scalatra-http-demo/src/main/webapp/assets/img/logo-x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.5/http/scalatra-http-demo/src/main/webapp/assets/img/logo-x.png -------------------------------------------------------------------------------- /2.5/http/scalatra-http-demo/src/main/webapp/assets/img/scalatra_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.5/http/scalatra-http-demo/src/main/webapp/assets/img/scalatra_logo.png -------------------------------------------------------------------------------- /2.5/http/scalatra-http-demo/src/main/webapp/assets/img/skeletal_weave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.5/http/scalatra-http-demo/src/main/webapp/assets/img/skeletal_weave.png -------------------------------------------------------------------------------- /2.5/http/scentry-auth-demo/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.15 2 | -------------------------------------------------------------------------------- /2.5/http/scentry-auth-demo/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.5.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.5/http/scentry-auth-demo/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import com.constructiveproof.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new ProtectedController, "/*") 8 | context.mount(new SessionsController, "/sessions/*") 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /2.5/http/scentry-auth-demo/src/main/scala/com/constructiveproof/example/models/User.scala: -------------------------------------------------------------------------------- 1 | package com.constructiveproof.example.models 2 | 3 | import org.slf4j.LoggerFactory 4 | 5 | case class User(id:String) { 6 | 7 | val logger = LoggerFactory.getLogger(getClass) 8 | 9 | def forgetMe = { 10 | logger.info("User: this is where you'd invalidate the saved token in you User model") 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /2.5/http/scentry-auth-demo/src/main/webapp/WEB-INF/templates/layouts/default.ssp: -------------------------------------------------------------------------------- 1 | <%@ val body: String %> 2 | 3 | 4 | 5 | <%= unescape(body) %> 6 | 7 | -------------------------------------------------------------------------------- /2.5/http/scentry-auth-demo/src/main/webapp/WEB-INF/templates/views/sessions/new.ssp: -------------------------------------------------------------------------------- 1 |

Please login:

2 | 3 | 4 |
5 |

6 |
7 |
8 | 9 |

10 |

11 | 12 |

13 |
-------------------------------------------------------------------------------- /2.5/persistence/riak-example/README.md: -------------------------------------------------------------------------------- 1 | # Riak Example # 2 | 3 | ## Build & Run ## 4 | 5 | ```sh 6 | $ git clone https://github.com/scalatra/scalatra-website-examples.git 7 | $ cd scalatra-website-examples/2.5/persistence/riak-example 8 | $ chmod +x sbt 9 | $ ./sbt ~jetty:start 10 | ``` 11 | 12 | Open [http://localhost:8080/](http://localhost:8080/) in your browser. 13 | -------------------------------------------------------------------------------- /2.5/persistence/riak-example/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.15 2 | -------------------------------------------------------------------------------- /2.5/persistence/riak-example/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.5.1") 2 | -------------------------------------------------------------------------------- /2.5/persistence/riak-example/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle with RiakJavaClientInit { 6 | 7 | override def init(context: ServletContext) { 8 | configureRiakJavaClient() 9 | context.mount(new SimpleRiakController, "/*") 10 | } 11 | 12 | override def destroy(context: ServletContext) { 13 | closeRiakJavaClient() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /2.5/persistence/riak-example/src/main/webapp/WEB-INF/templates/layouts/default.jade: -------------------------------------------------------------------------------- 1 | -@ val title: String 2 | -@ val headline: String = title 3 | -@ val body: String 4 | 5 | !!! 6 | html 7 | head 8 | title= title 9 | body 10 | #content 11 | h1= headline 12 | != body 13 | -------------------------------------------------------------------------------- /2.5/persistence/riak-example/src/main/webapp/WEB-INF/templates/views/hello-scalate.jade: -------------------------------------------------------------------------------- 1 | - attributes("title") = "Scalatra: a tiny, Sinatra-like web framework for Scala" 2 | - attributes("headline") = "Welcome to Scalatra" 3 | 4 | p= "Hello, Scalate!" -------------------------------------------------------------------------------- /2.5/persistence/scalatra-casbah-example/README.md: -------------------------------------------------------------------------------- 1 | # Scalatra Casbah Example # 2 | 3 | ## Build & Run ## 4 | 5 | ```sh 6 | $ git clone https://github.com/scalatra/scalatra-website-examples.git 7 | $ cd scalatra-website-examples/2.5/persistence/scalatra-casbah-example 8 | $ chmod +x sbt 9 | $ ./sbt ~jetty:start 10 | ``` 11 | 12 | Open [http://localhost:8080/](http://localhost:8080/) in your browser. 13 | -------------------------------------------------------------------------------- /2.5/persistence/scalatra-casbah-example/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.15 2 | -------------------------------------------------------------------------------- /2.5/persistence/scalatra-casbah-example/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.5.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.5/persistence/scalatra-casbah-example/src/main/webapp/WEB-INF/templates/layouts/default.jade: -------------------------------------------------------------------------------- 1 | -@ val title: String 2 | -@ val headline: String = title 3 | -@ val body: String 4 | 5 | !!! 6 | html 7 | head 8 | title= title 9 | body 10 | #content 11 | h1= headline 12 | != body 13 | -------------------------------------------------------------------------------- /2.5/persistence/scalatra-casbah-example/src/main/webapp/WEB-INF/templates/views/hello-scalate.jade: -------------------------------------------------------------------------------- 1 | - attributes("title") = "Scalatra: a tiny, Sinatra-like web framework for Scala" 2 | - attributes("headline") = "Welcome to Scalatra" 3 | 4 | p= "Hello, Scalate!" -------------------------------------------------------------------------------- /2.5/persistence/scalatra-slick/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | target/ 3 | /.lib/ 4 | .idea 5 | .idea_modules -------------------------------------------------------------------------------- /2.5/persistence/scalatra-slick/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.15 2 | -------------------------------------------------------------------------------- /2.5/persistence/scalatra-slick/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.5.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.5/persistence/scalatra-slick/src/main/resources/c3p0.properties: -------------------------------------------------------------------------------- 1 | c3p0.driverClass=org.h2.Driver 2 | c3p0.jdbcUrl=jdbc:h2:mem:test 3 | c3p0.user=root 4 | c3p0.password= 5 | c3p0.minPoolSize=1 6 | c3p0.acquireIncrement=1 7 | c3p0.maxPoolSize=50 8 | -------------------------------------------------------------------------------- /2.5/persistence/scalatra-squeryl/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.15 2 | -------------------------------------------------------------------------------- /2.5/persistence/scalatra-squeryl/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.5.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.5/persistence/scalatra-squeryl/src/main/webapp/WEB-INF/views/articles/index.ssp: -------------------------------------------------------------------------------- 1 | <% import org.scalatra.example.models.Article %> 2 | <%@ val articles:List[Article] %> 3 | 4 |
5 |
6 | 7 | #for(article <- articles) 8 |

<%= article.title %>

9 | 10 |

<%= unescape(article.body.replace("\n", "
")) %>

11 | #end 12 | 13 |
14 |
15 | -------------------------------------------------------------------------------- /2.5/persistence/scalatra-squeryl/src/main/webapp/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.5/persistence/scalatra-squeryl/src/main/webapp/favicon.ico -------------------------------------------------------------------------------- /2.5/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.5/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /2.5/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.5/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /2.5/resources/scalatra-coffeescript/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.15 2 | -------------------------------------------------------------------------------- /2.5/resources/scalatra-coffeescript/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.5.1") 2 | addSbtPlugin("com.bowlingx" %% "xsbt-wro4j-plugin" % "0.3.5") 3 | 4 | resolvers += Resolver.url("sbt-plugin-snapshots", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-snapshots/"))(Resolver.ivyStylePatterns) 5 | -------------------------------------------------------------------------------- /2.5/resources/scalatra-coffeescript/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new CoffeeScriptApp, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.5/resources/scalatra-coffeescript/src/main/webapp/WEB-INF/wro.properties: -------------------------------------------------------------------------------- 1 | preProcessors = coffeeScript 2 | postProcessors = -------------------------------------------------------------------------------- /2.5/resources/scalatra-coffeescript/src/main/webapp/WEB-INF/wro.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | /coffee/*.coffee 10 | 11 | 12 | -------------------------------------------------------------------------------- /2.5/resources/scalatra-coffeescript/src/main/webapp/coffee/main.coffee: -------------------------------------------------------------------------------- 1 | alert "Hello CoffeeScript!" -------------------------------------------------------------------------------- /2.5/resources/scalatra-less-css/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.15 2 | -------------------------------------------------------------------------------- /2.5/resources/scalatra-less-css/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.5.1") 2 | addSbtPlugin("com.bowlingx" %% "xsbt-wro4j-plugin" % "0.3.5") 3 | 4 | resolvers += Resolver.url("sbt-plugin-snapshots", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-snapshots/"))(Resolver.ivyStylePatterns) 5 | -------------------------------------------------------------------------------- /2.5/resources/scalatra-less-css/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new LessCssApp, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.5/resources/scalatra-less-css/src/main/webapp/WEB-INF/wro.properties: -------------------------------------------------------------------------------- 1 | preProcessors = lessCss 2 | postProcessors = -------------------------------------------------------------------------------- /2.5/resources/scalatra-less-css/src/main/webapp/WEB-INF/wro.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | /less/*.less 10 | 11 | 12 | -------------------------------------------------------------------------------- /2.5/resources/scalatra-less-css/src/main/webapp/less/main.less: -------------------------------------------------------------------------------- 1 | @base: #f938ab; 2 | 3 | body { 4 | color: @base 5 | } -------------------------------------------------------------------------------- /2.5/swagger-example/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.15 2 | -------------------------------------------------------------------------------- /2.5/swagger-example/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.5.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.5/swagger-example/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /2.5/swagger-example/src/main/webapp/WEB-INF/layouts/default.scaml: -------------------------------------------------------------------------------- 1 | -@ val title: String 2 | -@ val headline: String = title 3 | -@ val body: String 4 | 5 | !!! 6 | %html 7 | %head 8 | %title= title 9 | %body 10 | #content 11 | %h1= headline 12 | != body 13 | -------------------------------------------------------------------------------- /2.5/swagger-example/src/main/webapp/WEB-INF/views/hello-scalate.scaml: -------------------------------------------------------------------------------- 1 | - attributes("title") = "Scalatra: a tiny, Sinatra-like web framework for Scala" 2 | - attributes("headline") = "Welcome to Scalatra" 3 | 4 | Hello, Scalate! -------------------------------------------------------------------------------- /2.5/views/scalatra-twirl/README.md: -------------------------------------------------------------------------------- 1 | # Scalatra Twirl example# 2 | 3 | Corresponds to the guide at [http://scalatra.org/guides/2.5/views/twirl.html](http://scalatra.org/guides/2.5/views/twirl.html) 4 | 5 | ## Build & Run ## 6 | 7 | ```sh 8 | $ git clone https://github.com/scalatra/scalatra-website-examples.git 9 | $ cd scalatra-website-examples/2.5/views/scalatra-twirl 10 | $ chmod +x sbt 11 | $ ./sbt ~jetty:start 12 | ``` 13 | 14 | Open [http://localhost:8080/](http://localhost:8080/) in your browser. 15 | -------------------------------------------------------------------------------- /2.5/views/scalatra-twirl/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=0.13.15 2 | -------------------------------------------------------------------------------- /2.5/views/scalatra-twirl/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.5.1") 2 | addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.3.2") 3 | 4 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 5 | -------------------------------------------------------------------------------- /2.5/views/scalatra-twirl/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | 3 | import org.scalatra._ 4 | import javax.servlet.ServletContext 5 | 6 | class ScalatraBootstrap extends LifeCycle { 7 | override def init(context: ServletContext) { 8 | context.mount(new ScalatraTwirlServlet, "/") 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /2.5/views/scalatra-twirl/src/main/scala/org/scalatra/example/ScalatraTwirlServlet.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class ScalatraTwirlServlet extends ScalatraServlet { 6 | 7 | get("/") { 8 | org.scalatra.example.html.hello(new java.util.Date) 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /2.5/views/scalatra-twirl/src/main/twirl/org/scalatra/example/hello.scala.html: -------------------------------------------------------------------------------- 1 | @(date: java.util.Date) 2 | 3 | 4 | 5 |

Twirl reporting for duty at @date.toString!

6 | 7 | 8 | -------------------------------------------------------------------------------- /2.6/async/akka-examples/README.md: -------------------------------------------------------------------------------- 1 | # akka-examples # 2 | 3 | Corresponds to the guide at [http://scalatra.org/guides/2.6/async/akka.html](http://scalatra.org/guides/2.6/async/akka.html) 4 | 5 | ## Build & Run ## 6 | 7 | ```sh 8 | $ git clone https://github.com/scalatra/scalatra-website-examples.git 9 | $ cd scalatra-website-examples/2.6/async/akka-examples 10 | $ chmod +x sbt 11 | $ ./sbt ~jetty:start 12 | ``` 13 | 14 | Open [http://localhost:8080/](http://localhost:8080/) in your browser. 15 | -------------------------------------------------------------------------------- /2.6/async/akka-examples/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.0.4 2 | -------------------------------------------------------------------------------- /2.6/async/akka-examples/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "sbt-scalatra" % "1.0.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.6/async/akka-examples/src/main/webapp/WEB-INF/layouts/default.scaml: -------------------------------------------------------------------------------- 1 | -@ val title: String 2 | -@ val headline: String = title 3 | -@ val body: String 4 | 5 | !!! 6 | %html 7 | %head 8 | %title= title 9 | %body 10 | #content 11 | %h1= headline 12 | != body 13 | -------------------------------------------------------------------------------- /2.6/async/akka-examples/src/main/webapp/WEB-INF/views/hello-scalate.scaml: -------------------------------------------------------------------------------- 1 | - attributes("title") = "Scalatra: a tiny, Sinatra-like web framework for Scala" 2 | - attributes("headline") = "Welcome to Scalatra" 3 | 4 | Hello, Scalate! -------------------------------------------------------------------------------- /2.6/async/scalatra-atmosphere-embedded/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.0.4 2 | -------------------------------------------------------------------------------- /2.6/async/scalatra-atmosphere-embedded/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "sbt-scalatra" % "1.0.1") 2 | addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.2") 3 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 4 | -------------------------------------------------------------------------------- /2.6/async/scalatra-atmosphere-embedded/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example.atmosphere._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new ChatController, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.6/async/scalatra-atmosphere-embedded/src/main/webapp/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.6/async/scalatra-atmosphere-embedded/src/main/webapp/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /2.6/async/scalatra-atmosphere-embedded/src/main/webapp/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.6/async/scalatra-atmosphere-embedded/src/main/webapp/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /2.6/async/scalatra-atmosphere-example/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.0.4 2 | -------------------------------------------------------------------------------- /2.6/async/scalatra-atmosphere-example/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "sbt-scalatra" % "1.0.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.6/async/scalatra-atmosphere-example/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example.atmosphere._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new ChatController, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.6/async/scalatra-atmosphere-example/src/main/webapp/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.6/async/scalatra-atmosphere-example/src/main/webapp/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /2.6/async/scalatra-atmosphere-example/src/main/webapp/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.6/async/scalatra-atmosphere-example/src/main/webapp/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /2.6/deployment/scalatra-heroku/Procfile: -------------------------------------------------------------------------------- 1 | web: target/universal/stage/bin/heroku-example -Dhttp.port=$PORT 2 | -------------------------------------------------------------------------------- /2.6/deployment/scalatra-heroku/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.0.4 2 | -------------------------------------------------------------------------------- /2.6/deployment/scalatra-heroku/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "sbt-scalatra" % "1.0.1") 2 | addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.2") 3 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 4 | -------------------------------------------------------------------------------- /2.6/deployment/scalatra-heroku/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new HerokuApp, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.6/deployment/scalatra-heroku/src/main/scala/org/scalatra/example/HerokuApp.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class HerokuApp extends ScalatraServlet { 6 | 7 | get("/") { 8 | 9 | 10 |

This is 11 | 12 | scalatra-heroku 13 | ! 14 |

15 | 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /2.6/deployment/scalatra-heroku/src/test/scala/org/scalatra/example/HerokuAppSpec.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra.test.specs2._ 4 | 5 | class HerokuAppSpec extends ScalatraSpec { def is = s2""" 6 | GET / on HerokuApp 7 | should return status 200 $root 8 | """ 9 | 10 | addServlet(classOf[HerokuApp], "/*") 11 | 12 | def root = get("/") { 13 | status must_== 200 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /2.6/formats/scalatra-forms/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.0.4 2 | -------------------------------------------------------------------------------- /2.6/formats/scalatra-forms/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "sbt-scalatra" % "1.0.1") 2 | addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.3.13") 3 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 4 | -------------------------------------------------------------------------------- /2.6/formats/scalatra-forms/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example.forms._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new FormsController, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.6/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.6/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /2.6/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.6/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /2.6/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.6/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /2.6/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.6/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /2.6/http/authentication-demo/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.0.4 2 | -------------------------------------------------------------------------------- /2.6/http/authentication-demo/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "sbt-scalatra" % "1.0.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.6/http/authentication-demo/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new AuthDemo, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.6/http/authentication-demo/src/main/scala/org/scalatra/example/AuthDemo.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class AuthDemo extends ScalatraServlet with AuthenticationSupport { 6 | 7 | get("/*") { 8 | val user: User = basicAuth.get 9 | 10 | 11 | 12 |

Hello '{user.id}' from Scalatra Basic Authentication Demo

13 |

You are authenticated.

14 | 15 | 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /2.6/http/scalatra-gzip/README.md: -------------------------------------------------------------------------------- 1 | # scalatra-gzip # 2 | 3 | Corresponds to the guide at [http://scalatra.org/guides/2.6/http/gzip.html](http://scalatra.org/guides/2.6/http/gzip.html). 4 | 5 | ## Build & Run ## 6 | 7 | ```sh 8 | $ git clone https://github.com/scalatra/scalatra-website-examples.git 9 | $ cd scalatra-website-examples/2.6/http/scalatra-gzip 10 | $ chmod +x sbt 11 | $ ./sbt ~jetty:start 12 | ``` 13 | 14 | Open [http://localhost:8080/](http://localhost:8080/) in your browser. 15 | -------------------------------------------------------------------------------- /2.6/http/scalatra-gzip/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.0.4 2 | -------------------------------------------------------------------------------- /2.6/http/scalatra-gzip/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "sbt-scalatra" % "1.0.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.6/http/scalatra-gzip/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new GZipApp, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.6/http/scalatra-gzip/src/main/scala/org/scalatra/example/GZipApp.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class GZipApp extends ScalatraServlet with ContentEncodingSupport { 6 | get("/") { 7 | 8 | 9 |

This is 10 | 11 | http/gzip 12 | ! 13 |

14 | 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /2.6/http/scalatra-http-demo/README.md: -------------------------------------------------------------------------------- 1 | # Scalatra HTTP Demo # 2 | 3 | ## Build & Run ## 4 | 5 | ```sh 6 | $ git clone https://github.com/scalatra/scalatra-website-examples.git 7 | $ cd scalatra-website-examples/2.6/http/scalatra-http-demo 8 | $ chmod +x sbt 9 | $ ./sbt ~jetty:start 10 | ``` 11 | 12 | Open [http://localhost:8080/](http://localhost:8080/) in your browser. 13 | -------------------------------------------------------------------------------- /2.6/http/scalatra-http-demo/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.0.4 2 | -------------------------------------------------------------------------------- /2.6/http/scalatra-http-demo/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "sbt-scalatra" % "1.0.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.6/http/scalatra-http-demo/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new CookiesExample, "/cookies-example") 8 | context.mount(new FileUploadExample, "/upload") 9 | context.mount(new FilterExample, "/") 10 | context.mount(new HttpExample, "/*") 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /2.6/http/scalatra-http-demo/src/main/webapp/assets/img/back_pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.6/http/scalatra-http-demo/src/main/webapp/assets/img/back_pattern.png -------------------------------------------------------------------------------- /2.6/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.6/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /2.6/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.6/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /2.6/http/scalatra-http-demo/src/main/webapp/assets/img/logo-s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.6/http/scalatra-http-demo/src/main/webapp/assets/img/logo-s.png -------------------------------------------------------------------------------- /2.6/http/scalatra-http-demo/src/main/webapp/assets/img/logo-x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.6/http/scalatra-http-demo/src/main/webapp/assets/img/logo-x.png -------------------------------------------------------------------------------- /2.6/http/scalatra-http-demo/src/main/webapp/assets/img/scalatra_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.6/http/scalatra-http-demo/src/main/webapp/assets/img/scalatra_logo.png -------------------------------------------------------------------------------- /2.6/http/scalatra-http-demo/src/main/webapp/assets/img/skeletal_weave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.6/http/scalatra-http-demo/src/main/webapp/assets/img/skeletal_weave.png -------------------------------------------------------------------------------- /2.6/http/scalatra-http-demo/src/test/resources/org/scalatra/example/scalatra.txt: -------------------------------------------------------------------------------- 1 | Tiny Scala high-performance, async web framework, inspired by Sinatra -------------------------------------------------------------------------------- /2.6/http/scentry-auth-demo/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.0.4 2 | -------------------------------------------------------------------------------- /2.6/http/scentry-auth-demo/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "sbt-scalatra" % "1.0.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.6/http/scentry-auth-demo/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import com.constructiveproof.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new ProtectedController, "/*") 8 | context.mount(new SessionsController, "/sessions/*") 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /2.6/http/scentry-auth-demo/src/main/scala/com/constructiveproof/example/models/User.scala: -------------------------------------------------------------------------------- 1 | package com.constructiveproof.example.models 2 | 3 | import org.slf4j.{Logger, LoggerFactory} 4 | 5 | case class User(id:String) { 6 | 7 | val logger: Logger = LoggerFactory.getLogger(getClass) 8 | 9 | def forgetMe(): Unit = { 10 | logger.info("User: this is where you'd invalidate the saved token in you User model") 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /2.6/http/scentry-auth-demo/src/main/webapp/WEB-INF/templates/layouts/default.ssp: -------------------------------------------------------------------------------- 1 | <%@ val body: String %> 2 | 3 | 4 | 5 | <%= unescape(body) %> 6 | 7 | -------------------------------------------------------------------------------- /2.6/http/scentry-auth-demo/src/main/webapp/WEB-INF/templates/views/sessions/new.ssp: -------------------------------------------------------------------------------- 1 |

Please login:

2 | 3 | 4 |
5 |

6 |
7 |
8 | 9 |

10 |

11 | 12 |

13 |
-------------------------------------------------------------------------------- /2.6/persistence/scalatra-slick/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | target/ 3 | /.lib/ 4 | .idea 5 | .idea_modules -------------------------------------------------------------------------------- /2.6/persistence/scalatra-slick/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.0.4 2 | -------------------------------------------------------------------------------- /2.6/persistence/scalatra-slick/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "sbt-scalatra" % "1.0.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.6/persistence/scalatra-slick/src/main/resources/c3p0.properties: -------------------------------------------------------------------------------- 1 | c3p0.driverClass=org.h2.Driver 2 | c3p0.jdbcUrl=jdbc:h2:mem:test 3 | c3p0.user=root 4 | c3p0.password= 5 | c3p0.minPoolSize=1 6 | c3p0.acquireIncrement=1 7 | c3p0.maxPoolSize=50 8 | -------------------------------------------------------------------------------- /2.6/persistence/scalatra-squeryl/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.0.4 2 | -------------------------------------------------------------------------------- /2.6/persistence/scalatra-squeryl/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "sbt-scalatra" % "1.0.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.6/persistence/scalatra-squeryl/src/main/webapp/WEB-INF/views/articles/index.ssp: -------------------------------------------------------------------------------- 1 | <% import org.scalatra.example.models.Article %> 2 | <%@ val articles:List[Article] %> 3 | 4 |
5 |
6 | 7 | #for(article <- articles) 8 |

<%= article.title %>

9 | 10 |

<%= unescape(article.body.replace("\n", "
")) %>

11 | #end 12 | 13 |
14 |
15 | -------------------------------------------------------------------------------- /2.6/persistence/scalatra-squeryl/src/main/webapp/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.6/persistence/scalatra-squeryl/src/main/webapp/favicon.ico -------------------------------------------------------------------------------- /2.6/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.6/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /2.6/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.6/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /2.6/swagger-example/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.2.8 2 | -------------------------------------------------------------------------------- /2.6/swagger-example/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "sbt-scalatra" % "1.0.2") 2 | addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.7.4") 3 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 4 | -------------------------------------------------------------------------------- /2.6/swagger-example/src/main/webapp/WEB-INF/layouts/default.scaml: -------------------------------------------------------------------------------- 1 | -@ val title: String 2 | -@ val headline: String = title 3 | -@ val body: String 4 | 5 | !!! 6 | %html 7 | %head 8 | %title= title 9 | %body 10 | #content 11 | %h1= headline 12 | != body 13 | -------------------------------------------------------------------------------- /2.6/swagger-example/src/main/webapp/WEB-INF/views/hello-scalate.scaml: -------------------------------------------------------------------------------- 1 | - attributes("title") = "Scalatra: a tiny, Sinatra-like web framework for Scala" 2 | - attributes("headline") = "Welcome to Scalatra" 3 | 4 | Hello, Scalate! -------------------------------------------------------------------------------- /2.6/views/scalatra-twirl/README.md: -------------------------------------------------------------------------------- 1 | # Scalatra Twirl example# 2 | 3 | Corresponds to the guide at [http://scalatra.org/guides/2.6/views/twirl.html](http://scalatra.org/guides/2.6/views/twirl.html) 4 | 5 | ## Build & Run ## 6 | 7 | ```sh 8 | $ git clone https://github.com/scalatra/scalatra-website-examples.git 9 | $ cd scalatra-website-examples/2.6/views/scalatra-twirl 10 | $ chmod +x sbt 11 | $ ./sbt ~jetty:start 12 | ``` 13 | 14 | Open [http://localhost:8080/](http://localhost:8080/) in your browser. 15 | -------------------------------------------------------------------------------- /2.6/views/scalatra-twirl/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.0.4 2 | -------------------------------------------------------------------------------- /2.6/views/scalatra-twirl/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scalatra.sbt" % "sbt-scalatra" % "1.0.1") 2 | addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.3.13") 3 | 4 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 5 | -------------------------------------------------------------------------------- /2.6/views/scalatra-twirl/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | 3 | import org.scalatra._ 4 | import javax.servlet.ServletContext 5 | 6 | class ScalatraBootstrap extends LifeCycle { 7 | override def init(context: ServletContext) { 8 | context.mount(new ScalatraTwirlServlet, "/") 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /2.6/views/scalatra-twirl/src/main/scala/org/scalatra/example/ScalatraTwirlServlet.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class ScalatraTwirlServlet extends ScalatraServlet { 6 | 7 | get("/") { 8 | org.scalatra.example.html.hello(new java.util.Date) 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /2.6/views/scalatra-twirl/src/main/twirl/org/scalatra/example/hello.scala.html: -------------------------------------------------------------------------------- 1 | @(date: java.util.Date) 2 | 3 | 4 | 5 |

Twirl reporting for duty at @date.toString!

6 | 7 | 8 | -------------------------------------------------------------------------------- /2.7/async/akka-examples/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.4.6 2 | -------------------------------------------------------------------------------- /2.7/async/akka-examples/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.7/async/akka-examples/src/main/webapp/WEB-INF/layouts/default.scaml: -------------------------------------------------------------------------------- 1 | -@ val title: String 2 | -@ val headline: String = title 3 | -@ val body: String 4 | 5 | !!! 6 | %html 7 | %head 8 | %title= title 9 | %body 10 | #content 11 | %h1= headline 12 | != body 13 | -------------------------------------------------------------------------------- /2.7/async/akka-examples/src/main/webapp/WEB-INF/views/hello-scalate.scaml: -------------------------------------------------------------------------------- 1 | - attributes("title") = "Scalatra: a tiny, Sinatra-like web framework for Scala" 2 | - attributes("headline") = "Welcome to Scalatra" 3 | 4 | Hello, Scalate! -------------------------------------------------------------------------------- /2.7/async/scalatra-atmosphere-embedded/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.4.6 2 | -------------------------------------------------------------------------------- /2.7/async/scalatra-atmosphere-embedded/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.1") 2 | addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.7.6") 3 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 4 | -------------------------------------------------------------------------------- /2.7/async/scalatra-atmosphere-embedded/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example.atmosphere._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new ChatController, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.7/async/scalatra-atmosphere-embedded/src/main/webapp/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.7/async/scalatra-atmosphere-embedded/src/main/webapp/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /2.7/async/scalatra-atmosphere-embedded/src/main/webapp/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.7/async/scalatra-atmosphere-embedded/src/main/webapp/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /2.7/async/scalatra-atmosphere-example/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.4.6 2 | -------------------------------------------------------------------------------- /2.7/async/scalatra-atmosphere-example/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.7/async/scalatra-atmosphere-example/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example.atmosphere._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new ChatController, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.7/async/scalatra-atmosphere-example/src/main/webapp/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.7/async/scalatra-atmosphere-example/src/main/webapp/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /2.7/async/scalatra-atmosphere-example/src/main/webapp/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.7/async/scalatra-atmosphere-example/src/main/webapp/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /2.7/deployment/scalatra-heroku/Procfile: -------------------------------------------------------------------------------- 1 | web: target/universal/stage/bin/heroku-example -Dhttp.port=$PORT 2 | -------------------------------------------------------------------------------- /2.7/deployment/scalatra-heroku/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.4.6 2 | -------------------------------------------------------------------------------- /2.7/deployment/scalatra-heroku/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.1") 2 | addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.7.6") 3 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 4 | -------------------------------------------------------------------------------- /2.7/deployment/scalatra-heroku/src/main/scala/HerokuApp.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class HerokuApp extends ScalatraServlet { 6 | 7 | get("/") { 8 | 9 | 10 |

This is 11 | 12 | scalatra-heroku 13 | ! 14 |

15 | 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /2.7/deployment/scalatra-heroku/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new HerokuApp, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.7/formats/scalatra-forms/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.4.6 2 | -------------------------------------------------------------------------------- /2.7/formats/scalatra-forms/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.1") 2 | addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.4.2") 3 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 4 | -------------------------------------------------------------------------------- /2.7/formats/scalatra-forms/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example.forms._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new FormsController, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.7/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.7/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /2.7/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.7/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /2.7/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.7/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /2.7/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.7/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /2.7/http/authentication-demo/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.4.6 2 | -------------------------------------------------------------------------------- /2.7/http/authentication-demo/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.7/http/authentication-demo/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new AuthDemo, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.7/http/authentication-demo/src/main/scala/org/scalatra/example/AuthDemo.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class AuthDemo extends ScalatraServlet with AuthenticationSupport { 6 | 7 | get("/*") { 8 | val user: User = basicAuth.get 9 | 10 | 11 | 12 |

Hello '{user.id}' from Scalatra Basic Authentication Demo

13 |

You are authenticated.

14 | 15 | 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /2.7/http/scalatra-gzip/README.md: -------------------------------------------------------------------------------- 1 | # scalatra-gzip # 2 | 3 | Corresponds to the guide at [http://scalatra.org/guides/2.7/http/gzip.html](http://scalatra.org/guides/2.7/http/gzip.html). 4 | 5 | ## Build & Run ## 6 | 7 | ```sh 8 | $ git clone https://github.com/scalatra/scalatra-website-examples.git 9 | $ cd scalatra-website-examples/2.7/http/scalatra-gzip 10 | $ chmod +x sbt 11 | $ ./sbt ~jetty:start 12 | ``` 13 | 14 | Open [http://localhost:8080/](http://localhost:8080/) in your browser. 15 | -------------------------------------------------------------------------------- /2.7/http/scalatra-gzip/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.4.6 2 | -------------------------------------------------------------------------------- /2.7/http/scalatra-gzip/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.7/http/scalatra-gzip/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new GZipApp, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.7/http/scalatra-gzip/src/main/scala/org/scalatra/example/GZipApp.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class GZipApp extends ScalatraServlet with ContentEncodingSupport { 6 | get("/") { 7 | 8 | 9 |

This is 10 | 11 | http/gzip 12 | ! 13 |

14 | 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /2.7/http/scalatra-http-demo/README.md: -------------------------------------------------------------------------------- 1 | # Scalatra HTTP Demo # 2 | 3 | ## Build & Run ## 4 | 5 | ```sh 6 | $ git clone https://github.com/scalatra/scalatra-website-examples.git 7 | $ cd scalatra-website-examples/2.7/http/scalatra-http-demo 8 | $ chmod +x sbt 9 | $ ./sbt ~jetty:start 10 | ``` 11 | 12 | Open [http://localhost:8080/](http://localhost:8080/) in your browser. 13 | -------------------------------------------------------------------------------- /2.7/http/scalatra-http-demo/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.4.6 2 | -------------------------------------------------------------------------------- /2.7/http/scalatra-http-demo/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.7/http/scalatra-http-demo/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new CookiesExample, "/cookies-example") 8 | context.mount(new FileUploadExample, "/upload") 9 | context.mount(new FilterExample, "/") 10 | context.mount(new HttpExample, "/*") 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /2.7/http/scalatra-http-demo/src/main/webapp/WEB-INF/templates/layouts/default.jade: -------------------------------------------------------------------------------- 1 | -@ val title: String 2 | -@ val headline: String = title 3 | -@ val body: String 4 | 5 | !!! 6 | html 7 | head 8 | title= title 9 | body 10 | #content 11 | h1= headline 12 | != body 13 | -------------------------------------------------------------------------------- /2.7/http/scalatra-http-demo/src/main/webapp/WEB-INF/templates/views/hello-scalate.jade: -------------------------------------------------------------------------------- 1 | - attributes("title") = "Scalatra: a tiny, Sinatra-like web framework for Scala" 2 | - attributes("headline") = "Welcome to Scalatra" 3 | 4 | p= "Hello, Scalate!" -------------------------------------------------------------------------------- /2.7/http/scalatra-http-demo/src/main/webapp/assets/img/back_pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.7/http/scalatra-http-demo/src/main/webapp/assets/img/back_pattern.png -------------------------------------------------------------------------------- /2.7/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.7/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /2.7/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.7/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /2.7/http/scalatra-http-demo/src/main/webapp/assets/img/logo-s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.7/http/scalatra-http-demo/src/main/webapp/assets/img/logo-s.png -------------------------------------------------------------------------------- /2.7/http/scalatra-http-demo/src/main/webapp/assets/img/logo-x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.7/http/scalatra-http-demo/src/main/webapp/assets/img/logo-x.png -------------------------------------------------------------------------------- /2.7/http/scalatra-http-demo/src/main/webapp/assets/img/scalatra_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.7/http/scalatra-http-demo/src/main/webapp/assets/img/scalatra_logo.png -------------------------------------------------------------------------------- /2.7/http/scalatra-http-demo/src/main/webapp/assets/img/skeletal_weave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.7/http/scalatra-http-demo/src/main/webapp/assets/img/skeletal_weave.png -------------------------------------------------------------------------------- /2.7/http/scentry-auth-demo/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.4.6 2 | -------------------------------------------------------------------------------- /2.7/http/scentry-auth-demo/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.7/http/scentry-auth-demo/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import com.constructiveproof.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) { 7 | context.mount(new ProtectedController, "/*") 8 | context.mount(new SessionsController, "/sessions/*") 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /2.7/http/scentry-auth-demo/src/main/scala/com/constructiveproof/example/models/User.scala: -------------------------------------------------------------------------------- 1 | package com.constructiveproof.example.models 2 | 3 | import org.slf4j.{Logger, LoggerFactory} 4 | 5 | case class User(id:String) { 6 | 7 | val logger: Logger = LoggerFactory.getLogger(getClass) 8 | 9 | def forgetMe(): Unit = { 10 | logger.info("User: this is where you'd invalidate the saved token in you User model") 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /2.7/http/scentry-auth-demo/src/main/webapp/WEB-INF/templates/layouts/default.ssp: -------------------------------------------------------------------------------- 1 | <%@ val body: String %> 2 | 3 | 4 | 5 | <%= unescape(body) %> 6 | 7 | -------------------------------------------------------------------------------- /2.7/http/scentry-auth-demo/src/main/webapp/WEB-INF/templates/views/sessions/new.ssp: -------------------------------------------------------------------------------- 1 |

Please login:

2 | 3 | 4 |
5 |

6 |
7 |
8 | 9 |

10 |

11 | 12 |

13 |
-------------------------------------------------------------------------------- /2.7/persistence/scalatra-mongo/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.4.6 2 | -------------------------------------------------------------------------------- /2.7/persistence/scalatra-mongo/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.7/persistence/scalatra-slick/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | target/ 3 | /.lib/ 4 | .idea 5 | .idea_modules -------------------------------------------------------------------------------- /2.7/persistence/scalatra-slick/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.4.6 2 | -------------------------------------------------------------------------------- /2.7/persistence/scalatra-slick/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.7/persistence/scalatra-slick/src/main/resources/c3p0.properties: -------------------------------------------------------------------------------- 1 | c3p0.driverClass=org.h2.Driver 2 | c3p0.jdbcUrl=jdbc:h2:mem:test 3 | c3p0.user=root 4 | c3p0.password= 5 | c3p0.minPoolSize=1 6 | c3p0.acquireIncrement=1 7 | c3p0.maxPoolSize=50 8 | -------------------------------------------------------------------------------- /2.7/persistence/scalatra-squeryl/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.4.6 2 | -------------------------------------------------------------------------------- /2.7/persistence/scalatra-squeryl/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.7/persistence/scalatra-squeryl/src/main/webapp/WEB-INF/views/articles/index.ssp: -------------------------------------------------------------------------------- 1 | <% import org.scalatra.example.models.Article %> 2 | <%@ val articles:List[Article] %> 3 | 4 |
5 |
6 | 7 | #for(article <- articles) 8 |

<%= article.title %>

9 | 10 |

<%= unescape(article.body.replace("\n", "
")) %>

11 | #end 12 | 13 |
14 |
15 | -------------------------------------------------------------------------------- /2.7/persistence/scalatra-squeryl/src/main/webapp/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.7/persistence/scalatra-squeryl/src/main/webapp/favicon.ico -------------------------------------------------------------------------------- /2.7/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.7/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /2.7/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.7/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /2.7/swagger-example/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.4.6 2 | -------------------------------------------------------------------------------- /2.7/swagger-example/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.1") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.7/swagger-example/src/main/webapp/WEB-INF/layouts/default.scaml: -------------------------------------------------------------------------------- 1 | -@ val title: String 2 | -@ val headline: String = title 3 | -@ val body: String 4 | 5 | !!! 6 | %html 7 | %head 8 | %title= title 9 | %body 10 | #content 11 | %h1= headline 12 | != body 13 | -------------------------------------------------------------------------------- /2.7/swagger-example/src/main/webapp/WEB-INF/views/hello-scalate.scaml: -------------------------------------------------------------------------------- 1 | - attributes("title") = "Scalatra: a tiny, Sinatra-like web framework for Scala" 2 | - attributes("headline") = "Welcome to Scalatra" 3 | 4 | Hello, Scalate! -------------------------------------------------------------------------------- /2.7/views/scalatra-twirl/README.md: -------------------------------------------------------------------------------- 1 | # Scalatra Twirl example# 2 | 3 | Corresponds to the guide at [http://scalatra.org/guides/2.7/views/twirl.html](http://scalatra.org/guides/2.7/views/twirl.html) 4 | 5 | ## Build & Run ## 6 | 7 | ```sh 8 | $ git clone https://github.com/scalatra/scalatra-website-examples.git 9 | $ cd scalatra-website-examples/2.7/views/scalatra-twirl 10 | $ chmod +x sbt 11 | $ ./sbt ~jetty:start 12 | ``` 13 | 14 | Open [http://localhost:8080/](http://localhost:8080/) in your browser. 15 | -------------------------------------------------------------------------------- /2.7/views/scalatra-twirl/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.4.6 2 | -------------------------------------------------------------------------------- /2.7/views/scalatra-twirl/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.1") 2 | addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.4.2") 3 | 4 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 5 | -------------------------------------------------------------------------------- /2.7/views/scalatra-twirl/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | 3 | import org.scalatra._ 4 | import javax.servlet.ServletContext 5 | 6 | class ScalatraBootstrap extends LifeCycle { 7 | override def init(context: ServletContext) { 8 | context.mount(new ScalatraTwirlServlet, "/") 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /2.7/views/scalatra-twirl/src/main/scala/org/scalatra/example/ScalatraTwirlServlet.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class ScalatraTwirlServlet extends ScalatraServlet { 6 | 7 | get("/") { 8 | org.scalatra.example.html.hello(new java.util.Date) 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /2.7/views/scalatra-twirl/src/main/twirl/org/scalatra/example/hello.scala.html: -------------------------------------------------------------------------------- 1 | @(date: java.util.Date) 2 | 3 | 4 | 5 |

Twirl reporting for duty at @date.toString!

6 | 7 | 8 | -------------------------------------------------------------------------------- /2.8/async/akka-examples/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.5.5 2 | -------------------------------------------------------------------------------- /2.8/async/akka-examples/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.4") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.8/deployment/scalatra-heroku/Procfile: -------------------------------------------------------------------------------- 1 | web: target/universal/stage/bin/heroku-example -Dhttp.port=$PORT 2 | -------------------------------------------------------------------------------- /2.8/deployment/scalatra-heroku/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.5.5 2 | -------------------------------------------------------------------------------- /2.8/deployment/scalatra-heroku/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.4") 2 | addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.7.6") 3 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 4 | -------------------------------------------------------------------------------- /2.8/deployment/scalatra-heroku/src/main/scala/HerokuApp.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class HerokuApp extends ScalatraServlet { 6 | 7 | get("/") { 8 | 9 | 10 |

This is 11 | 12 | scalatra-heroku 13 | ! 14 |

15 | 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /2.8/deployment/scalatra-heroku/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) = { 7 | context.mount(new HerokuApp, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.8/formats/scalatra-forms/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.5.5 2 | -------------------------------------------------------------------------------- /2.8/formats/scalatra-forms/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.4") 2 | addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.5.1") 3 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 4 | -------------------------------------------------------------------------------- /2.8/formats/scalatra-forms/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example.forms._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) = { 7 | context.mount(new FormsController, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.8/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.8/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /2.8/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.8/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /2.8/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.8/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /2.8/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.8/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /2.8/http/authentication-demo/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.5.5 2 | -------------------------------------------------------------------------------- /2.8/http/authentication-demo/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.4") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.8/http/authentication-demo/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) = { 7 | context.mount(new AuthDemo, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.8/http/authentication-demo/src/main/scala/org/scalatra/example/AuthDemo.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class AuthDemo extends ScalatraServlet with AuthenticationSupport { 6 | 7 | get("/*") { 8 | val user: User = basicAuth().get 9 | 10 | 11 | 12 |

Hello '{user.id}' from Scalatra Basic Authentication Demo

13 |

You are authenticated.

14 | 15 | 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /2.8/http/scalatra-gzip/README.md: -------------------------------------------------------------------------------- 1 | # scalatra-gzip # 2 | 3 | Corresponds to the guide at [http://scalatra.org/guides/2.8/http/gzip.html](http://scalatra.org/guides/2.8/http/gzip.html). 4 | 5 | ## Build & Run ## 6 | 7 | ```sh 8 | $ git clone https://github.com/scalatra/scalatra-website-examples.git 9 | $ cd scalatra-website-examples/2.8/http/scalatra-gzip 10 | $ chmod +x sbt 11 | $ ./sbt ~jetty:start 12 | ``` 13 | 14 | Open [http://localhost:8080/](http://localhost:8080/) in your browser. 15 | -------------------------------------------------------------------------------- /2.8/http/scalatra-gzip/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.5.5 2 | -------------------------------------------------------------------------------- /2.8/http/scalatra-gzip/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.4") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.8/http/scalatra-gzip/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) = { 7 | context.mount(new GZipApp, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /2.8/http/scalatra-gzip/src/main/scala/org/scalatra/example/GZipApp.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class GZipApp extends ScalatraServlet with ContentEncodingSupport { 6 | get("/") { 7 | 8 | 9 |

This is 10 | 11 | http/gzip 12 | ! 13 |

14 | 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /2.8/http/scalatra-http-demo/README.md: -------------------------------------------------------------------------------- 1 | # Scalatra HTTP Demo # 2 | 3 | ## Build & Run ## 4 | 5 | ```sh 6 | $ git clone https://github.com/scalatra/scalatra-website-examples.git 7 | $ cd scalatra-website-examples/2.8/http/scalatra-http-demo 8 | $ chmod +x sbt 9 | $ ./sbt ~jetty:start 10 | ``` 11 | 12 | Open [http://localhost:8080/](http://localhost:8080/) in your browser. 13 | -------------------------------------------------------------------------------- /2.8/http/scalatra-http-demo/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.5.5 2 | -------------------------------------------------------------------------------- /2.8/http/scalatra-http-demo/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.4") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.8/http/scalatra-http-demo/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) = { 7 | context.mount(new CookiesExample, "/cookies-example") 8 | context.mount(new FileUploadExample, "/upload") 9 | context.mount(new FilterExample, "/") 10 | context.mount(new HttpExample, "/*") 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /2.8/http/scalatra-http-demo/src/main/webapp/assets/img/back_pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.8/http/scalatra-http-demo/src/main/webapp/assets/img/back_pattern.png -------------------------------------------------------------------------------- /2.8/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.8/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /2.8/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.8/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /2.8/http/scalatra-http-demo/src/main/webapp/assets/img/logo-s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.8/http/scalatra-http-demo/src/main/webapp/assets/img/logo-s.png -------------------------------------------------------------------------------- /2.8/http/scalatra-http-demo/src/main/webapp/assets/img/logo-x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.8/http/scalatra-http-demo/src/main/webapp/assets/img/logo-x.png -------------------------------------------------------------------------------- /2.8/http/scalatra-http-demo/src/main/webapp/assets/img/scalatra_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.8/http/scalatra-http-demo/src/main/webapp/assets/img/scalatra_logo.png -------------------------------------------------------------------------------- /2.8/http/scalatra-http-demo/src/main/webapp/assets/img/skeletal_weave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.8/http/scalatra-http-demo/src/main/webapp/assets/img/skeletal_weave.png -------------------------------------------------------------------------------- /2.8/http/scentry-auth-demo/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.5.5 2 | -------------------------------------------------------------------------------- /2.8/http/scentry-auth-demo/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.4") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.8/http/scentry-auth-demo/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import com.constructiveproof.example._ 2 | import org.scalatra._ 3 | import javax.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) = { 7 | context.mount(new ProtectedController, "/*") 8 | context.mount(new SessionsController, "/sessions/*") 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /2.8/http/scentry-auth-demo/src/main/scala/com/constructiveproof/example/models/User.scala: -------------------------------------------------------------------------------- 1 | package com.constructiveproof.example.models 2 | 3 | import org.slf4j.{Logger, LoggerFactory} 4 | 5 | case class User(id:String) { 6 | 7 | val logger: Logger = LoggerFactory.getLogger(getClass) 8 | 9 | def forgetMe(): Unit = { 10 | logger.info("User: this is where you'd invalidate the saved token in you User model") 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /2.8/persistence/scalatra-mongo/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.5.5 2 | -------------------------------------------------------------------------------- /2.8/persistence/scalatra-mongo/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.4") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.8/persistence/scalatra-slick/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | target/ 3 | /.lib/ 4 | .idea 5 | .idea_modules -------------------------------------------------------------------------------- /2.8/persistence/scalatra-slick/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.5.5 2 | -------------------------------------------------------------------------------- /2.8/persistence/scalatra-slick/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.4") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.8/persistence/scalatra-slick/src/main/resources/c3p0.properties: -------------------------------------------------------------------------------- 1 | c3p0.driverClass=org.h2.Driver 2 | c3p0.jdbcUrl=jdbc:h2:mem:test 3 | c3p0.user=root 4 | c3p0.password= 5 | c3p0.minPoolSize=1 6 | c3p0.acquireIncrement=1 7 | c3p0.maxPoolSize=50 8 | -------------------------------------------------------------------------------- /2.8/persistence/scalatra-squeryl/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.5.5 2 | -------------------------------------------------------------------------------- /2.8/persistence/scalatra-squeryl/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.4") 2 | addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.5.1") 3 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 4 | -------------------------------------------------------------------------------- /2.8/persistence/scalatra-squeryl/src/main/twirl/index.scala.html: -------------------------------------------------------------------------------- 1 | @(articles: List[org.scalatra.example.models.Article])(implicit flash: org.scalatra.FlashMap) 2 | @layout { 3 |
4 |
5 | @articles.map { article => 6 |

@{article.title}

7 | 8 |

@Html(article.body.replace("\n", "
"))

9 | } 10 |
11 |
12 | } 13 | -------------------------------------------------------------------------------- /2.8/persistence/scalatra-squeryl/src/main/webapp/WEB-INF/views/articles/index.ssp: -------------------------------------------------------------------------------- 1 | <% import org.scalatra.example.models.Article %> 2 | <%@ val articles:List[Article] %> 3 | 4 |
5 |
6 | 7 | #for(article <- articles) 8 |

<%= article.title %>

9 | 10 |

<%= unescape(article.body.replace("\n", "
")) %>

11 | #end 12 | 13 |
14 |
15 | -------------------------------------------------------------------------------- /2.8/persistence/scalatra-squeryl/src/main/webapp/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.8/persistence/scalatra-squeryl/src/main/webapp/favicon.ico -------------------------------------------------------------------------------- /2.8/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.8/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /2.8/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/2.8/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /2.8/swagger-example/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.5.5 2 | -------------------------------------------------------------------------------- /2.8/swagger-example/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.4") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /2.8/views/scalatra-twirl/README.md: -------------------------------------------------------------------------------- 1 | # Scalatra Twirl example# 2 | 3 | Corresponds to the guide at [http://scalatra.org/guides/2.8/views/twirl.html](http://scalatra.org/guides/2.8/views/twirl.html) 4 | 5 | ## Build & Run ## 6 | 7 | ```sh 8 | $ git clone https://github.com/scalatra/scalatra-website-examples.git 9 | $ cd scalatra-website-examples/2.8/views/scalatra-twirl 10 | $ chmod +x sbt 11 | $ ./sbt ~jetty:start 12 | ``` 13 | 14 | Open [http://localhost:8080/](http://localhost:8080/) in your browser. 15 | -------------------------------------------------------------------------------- /2.8/views/scalatra-twirl/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.5.5 2 | -------------------------------------------------------------------------------- /2.8/views/scalatra-twirl/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.4") 2 | addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.5.1") 3 | 4 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 5 | -------------------------------------------------------------------------------- /2.8/views/scalatra-twirl/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | 3 | import org.scalatra._ 4 | import javax.servlet.ServletContext 5 | 6 | class ScalatraBootstrap extends LifeCycle { 7 | override def init(context: ServletContext) = { 8 | context.mount(new ScalatraTwirlServlet, "/") 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /2.8/views/scalatra-twirl/src/main/scala/org/scalatra/example/ScalatraTwirlServlet.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class ScalatraTwirlServlet extends ScalatraServlet { 6 | 7 | get("/") { 8 | org.scalatra.example.html.hello(new java.util.Date) 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /2.8/views/scalatra-twirl/src/main/twirl/org/scalatra/example/hello.scala.html: -------------------------------------------------------------------------------- 1 | @(date: java.util.Date) 2 | 3 | 4 | 5 |

Twirl reporting for duty at @date.toString!

6 | 7 | 8 | -------------------------------------------------------------------------------- /3.0/async/pekko-examples/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.9.7 2 | -------------------------------------------------------------------------------- /3.0/async/pekko-examples/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.4") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /3.0/formats/scalatra-forms/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.9.7 2 | -------------------------------------------------------------------------------- /3.0/formats/scalatra-forms/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.typesafe.play" % "sbt-twirl" % "1.6.1") 2 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.4") 3 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 4 | -------------------------------------------------------------------------------- /3.0/formats/scalatra-forms/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example.forms._ 2 | import org.scalatra._ 3 | import jakarta.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) = { 7 | context.mount(new FormsController, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /3.0/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/3.0/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /3.0/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/3.0/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /3.0/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/3.0/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /3.0/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/3.0/formats/scalatra-forms/src/main/webapp/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /3.0/http/authentication-demo/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.9.7 2 | -------------------------------------------------------------------------------- /3.0/http/authentication-demo/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.4") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /3.0/http/authentication-demo/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import jakarta.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) = { 7 | context.mount(new AuthDemo, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /3.0/http/authentication-demo/src/main/scala/org/scalatra/example/AuthDemo.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class AuthDemo extends ScalatraServlet with AuthenticationSupport { 6 | 7 | get("/*") { 8 | val user: User = basicAuth().get 9 | 10 | 11 | 12 |

Hello '{user.id}' from Scalatra Basic Authentication Demo

13 |

You are authenticated.

14 | 15 | 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /3.0/http/scalatra-gzip/README.md: -------------------------------------------------------------------------------- 1 | # scalatra-gzip # 2 | 3 | Corresponds to the guide at [http://scalatra.org/guides/3.0/http/gzip.html](http://scalatra.org/guides/3.0/http/gzip.html). 4 | 5 | ## Build & Run ## 6 | 7 | ```sh 8 | $ git clone https://github.com/scalatra/scalatra-website-examples.git 9 | $ cd scalatra-website-examples/3.0/http/scalatra-gzip 10 | $ chmod +x sbt 11 | $ ./sbt ~Jetty/start 12 | ``` 13 | 14 | Open [http://localhost:8080/](http://localhost:8080/) in your browser. 15 | -------------------------------------------------------------------------------- /3.0/http/scalatra-gzip/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.9.7 2 | -------------------------------------------------------------------------------- /3.0/http/scalatra-gzip/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.4") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /3.0/http/scalatra-gzip/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import jakarta.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) = { 7 | context.mount(new GZipApp, "/*") 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /3.0/http/scalatra-gzip/src/main/scala/org/scalatra/example/GZipApp.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class GZipApp extends ScalatraServlet with ContentEncodingSupport { 6 | get("/") { 7 | 8 | 9 |

This is 10 | 11 | http/gzip 12 | ! 13 |

14 | 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /3.0/http/scalatra-http-demo/README.md: -------------------------------------------------------------------------------- 1 | # Scalatra HTTP Demo # 2 | 3 | ## Build & Run ## 4 | 5 | ```sh 6 | $ git clone https://github.com/scalatra/scalatra-website-examples.git 7 | $ cd scalatra-website-examples/3.0/http/scalatra-http-demo 8 | $ chmod +x sbt 9 | $ ./sbt ~Jetty/start 10 | ``` 11 | 12 | Open [http://localhost:8080/](http://localhost:8080/) in your browser. 13 | -------------------------------------------------------------------------------- /3.0/http/scalatra-http-demo/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.9.7 2 | -------------------------------------------------------------------------------- /3.0/http/scalatra-http-demo/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.4") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /3.0/http/scalatra-http-demo/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | import org.scalatra._ 3 | import jakarta.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) = { 7 | context.mount(new CookiesExample, "/cookies-example") 8 | context.mount(new FileUploadExample, "/upload") 9 | context.mount(new FilterExample, "/") 10 | context.mount(new HttpExample, "/*") 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /3.0/http/scalatra-http-demo/src/main/webapp/assets/img/back_pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/3.0/http/scalatra-http-demo/src/main/webapp/assets/img/back_pattern.png -------------------------------------------------------------------------------- /3.0/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/3.0/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /3.0/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/3.0/http/scalatra-http-demo/src/main/webapp/assets/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /3.0/http/scalatra-http-demo/src/main/webapp/assets/img/logo-s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/3.0/http/scalatra-http-demo/src/main/webapp/assets/img/logo-s.png -------------------------------------------------------------------------------- /3.0/http/scalatra-http-demo/src/main/webapp/assets/img/logo-x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/3.0/http/scalatra-http-demo/src/main/webapp/assets/img/logo-x.png -------------------------------------------------------------------------------- /3.0/http/scalatra-http-demo/src/main/webapp/assets/img/scalatra_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/3.0/http/scalatra-http-demo/src/main/webapp/assets/img/scalatra_logo.png -------------------------------------------------------------------------------- /3.0/http/scalatra-http-demo/src/main/webapp/assets/img/skeletal_weave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/3.0/http/scalatra-http-demo/src/main/webapp/assets/img/skeletal_weave.png -------------------------------------------------------------------------------- /3.0/http/scentry-auth-demo/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.9.7 2 | -------------------------------------------------------------------------------- /3.0/http/scentry-auth-demo/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.4") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /3.0/http/scentry-auth-demo/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import com.constructiveproof.example._ 2 | import org.scalatra._ 3 | import jakarta.servlet.ServletContext 4 | 5 | class ScalatraBootstrap extends LifeCycle { 6 | override def init(context: ServletContext) = { 7 | context.mount(new ProtectedController, "/*") 8 | context.mount(new SessionsController, "/sessions/*") 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /3.0/http/scentry-auth-demo/src/main/scala/com/constructiveproof/example/models/User.scala: -------------------------------------------------------------------------------- 1 | package com.constructiveproof.example.models 2 | 3 | import org.slf4j.{Logger, LoggerFactory} 4 | 5 | case class User(id:String) { 6 | 7 | val logger: Logger = LoggerFactory.getLogger(getClass) 8 | 9 | def forgetMe(): Unit = { 10 | logger.info("User: this is where you'd invalidate the saved token in you User model") 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /3.0/persistence/scalatra-slick/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | target/ 3 | /.lib/ 4 | .idea 5 | .idea_modules -------------------------------------------------------------------------------- /3.0/persistence/scalatra-slick/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.9.7 2 | -------------------------------------------------------------------------------- /3.0/persistence/scalatra-slick/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.4") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /3.0/persistence/scalatra-slick/src/main/resources/c3p0.properties: -------------------------------------------------------------------------------- 1 | c3p0.driverClass=org.h2.Driver 2 | c3p0.jdbcUrl=jdbc:h2:mem:test 3 | c3p0.user=root 4 | c3p0.password= 5 | c3p0.minPoolSize=1 6 | c3p0.acquireIncrement=1 7 | c3p0.maxPoolSize=50 8 | -------------------------------------------------------------------------------- /3.0/persistence/scalatra-squeryl/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.9.7 2 | -------------------------------------------------------------------------------- /3.0/persistence/scalatra-squeryl/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.4") 2 | addSbtPlugin("com.typesafe.play" % "sbt-twirl" % "1.6.1") 3 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 4 | -------------------------------------------------------------------------------- /3.0/persistence/scalatra-squeryl/src/main/twirl/index.scala.html: -------------------------------------------------------------------------------- 1 | @(articles: List[org.scalatra.example.models.Article])(implicit flash: org.scalatra.FlashMap) 2 | @layout { 3 |
4 |
5 | @articles.map { article => 6 |

@{article.title}

7 | 8 |

@Html(article.body.replace("\n", "
"))

9 | } 10 |
11 |
12 | } 13 | -------------------------------------------------------------------------------- /3.0/persistence/scalatra-squeryl/src/main/webapp/WEB-INF/views/articles/index.ssp: -------------------------------------------------------------------------------- 1 | <% import org.scalatra.example.models.Article %> 2 | <%@ val articles:List[Article] %> 3 | 4 |
5 |
6 | 7 | #for(article <- articles) 8 |

<%= article.title %>

9 | 10 |

<%= unescape(article.body.replace("\n", "
")) %>

11 | #end 12 | 13 |
14 |
15 | -------------------------------------------------------------------------------- /3.0/persistence/scalatra-squeryl/src/main/webapp/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/3.0/persistence/scalatra-squeryl/src/main/webapp/favicon.ico -------------------------------------------------------------------------------- /3.0/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/3.0/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /3.0/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scalatra/scalatra-website-examples/f1f3ca86c9aac336a576686630a788a516503a03/3.0/persistence/scalatra-squeryl/src/main/webapp/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /3.0/swagger-example/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.9.7 2 | -------------------------------------------------------------------------------- /3.0/swagger-example/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.4") 2 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 3 | -------------------------------------------------------------------------------- /3.0/views/scalatra-twirl/README.md: -------------------------------------------------------------------------------- 1 | # Scalatra Twirl example# 2 | 3 | Corresponds to the guide at [http://scalatra.org/guides/3.0/views/twirl.html](http://scalatra.org/guides/3.0/views/twirl.html) 4 | 5 | ## Build & Run ## 6 | 7 | ```sh 8 | $ git clone https://github.com/scalatra/scalatra-website-examples.git 9 | $ cd scalatra-website-examples/3.0/views/scalatra-twirl 10 | $ chmod +x sbt 11 | $ ./sbt ~Jetty/start 12 | ``` 13 | 14 | Open [http://localhost:8080/](http://localhost:8080/) in your browser. 15 | -------------------------------------------------------------------------------- /3.0/views/scalatra-twirl/project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.9.7 2 | -------------------------------------------------------------------------------- /3.0/views/scalatra-twirl/project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "4.2.4") 2 | addSbtPlugin("com.typesafe.play" % "sbt-twirl" % "1.6.1") 3 | 4 | scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") 5 | -------------------------------------------------------------------------------- /3.0/views/scalatra-twirl/src/main/scala/ScalatraBootstrap.scala: -------------------------------------------------------------------------------- 1 | import org.scalatra.example._ 2 | 3 | import org.scalatra._ 4 | import jakarta.servlet.ServletContext 5 | 6 | class ScalatraBootstrap extends LifeCycle { 7 | override def init(context: ServletContext) = { 8 | context.mount(new ScalatraTwirlServlet, "/") 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /3.0/views/scalatra-twirl/src/main/scala/org/scalatra/example/ScalatraTwirlServlet.scala: -------------------------------------------------------------------------------- 1 | package org.scalatra.example 2 | 3 | import org.scalatra._ 4 | 5 | class ScalatraTwirlServlet extends ScalatraServlet { 6 | 7 | get("/") { 8 | org.scalatra.example.html.hello(new java.util.Date) 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /3.0/views/scalatra-twirl/src/main/twirl/org/scalatra/example/hello.scala.html: -------------------------------------------------------------------------------- 1 | @(date: java.util.Date) 2 | 3 | 4 | 5 |

Twirl reporting for duty at @date.toString!

6 | 7 | 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # scalatra-website-examples # 2 | 3 | Collection of **completely standalone** Scalatra projects used as examples in the 4 | [official documentation](http://scalatra.org). 5 | --------------------------------------------------------------------------------