From a0686edc9cb2d16219de5456f00bc4ca6871110e Mon Sep 17 00:00:00 2001 From: jboner Date: Wed, 5 Aug 2009 15:48:00 +0200 Subject: [PATCH 1/3] added web.xml to lift sample --- .../src/main/webapp/WEB-INF/.DS_Store | Bin 0 -> 6148 bytes samples-lift/src/main/webapp/WEB-INF/web.xml | 22 ++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 samples-lift/src/main/webapp/WEB-INF/.DS_Store create mode 100644 samples-lift/src/main/webapp/WEB-INF/web.xml diff --git a/samples-lift/src/main/webapp/WEB-INF/.DS_Store b/samples-lift/src/main/webapp/WEB-INF/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmZQzU|@7AO)+F(5MW?n;9!8z45|!R0Z1N%F(jFgL>QrFAPJ2!M?+vV1V%$(Gz3ON zU^D~25V%SxcdJP zRior+2#kinunYl47MEZbCs3t{!+W4QHvuXKVuPw;Mo^s$(F3lEVT}ML$bg~*R5_@+ b2Uo?6kTwK}57Iu`5P${HC_Nei0}uiLNUI8I literal 0 HcmV?d00001 diff --git a/samples-lift/src/main/webapp/WEB-INF/web.xml b/samples-lift/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..f8ee2157a1 --- /dev/null +++ b/samples-lift/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,22 @@ + + + + + LiftFilter + Lift Filter + The Filter that intercepts lift calls + net.liftweb.http.LiftFilter + + + LiftFilter + /* + + + AkkaServlet + se.scalablesolutions.akka.kernel.jersey.AkkaServlet + + + AkkaServlet + /* + + From a0e6b53d6feb0d372974bb865ae68f871f416d84 Mon Sep 17 00:00:00 2001 From: jboner Date: Wed, 5 Aug 2009 15:48:41 +0200 Subject: [PATCH 2/3] removed tmp file --- samples-lift/src/main/webapp/WEB-INF/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 samples-lift/src/main/webapp/WEB-INF/.DS_Store diff --git a/samples-lift/src/main/webapp/WEB-INF/.DS_Store b/samples-lift/src/main/webapp/WEB-INF/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmZQzU|@7AO)+F(5MW?n;9!8z45|!R0Z1N%F(jFgL>QrFAPJ2!M?+vV1V%$(Gz3ON zU^D~25V%SxcdJP zRior+2#kinunYl47MEZbCs3t{!+W4QHvuXKVuPw;Mo^s$(F3lEVT}ML$bg~*R5_@+ b2Uo?6kTwK}57Iu`5P${HC_Nei0}uiLNUI8I From 7419c86270dc34c98a50b0a06fa856a3ea296ec6 Mon Sep 17 00:00:00 2001 From: Timothy Perrett Date: Wed, 5 Aug 2009 23:33:06 +0100 Subject: [PATCH 3/3] Updated Lift / Akka Sample --- .../main/scala/bootstrap/liftweb/Boot.scala | 2 +- .../src/main/scala/snippet/HelloWorld.scala | 2 +- samples-lift/src/main/webapp/index.html | 14 ++++++++-- .../main/webapp/templates-hidden/default.html | 28 ++++++++++--------- 4 files changed, 29 insertions(+), 17 deletions(-) diff --git a/samples-lift/src/main/scala/bootstrap/liftweb/Boot.scala b/samples-lift/src/main/scala/bootstrap/liftweb/Boot.scala index 5e3b9c1591..0cf98c8af4 100644 --- a/samples-lift/src/main/scala/bootstrap/liftweb/Boot.scala +++ b/samples-lift/src/main/scala/bootstrap/liftweb/Boot.scala @@ -23,7 +23,7 @@ class Boot { LiftRules.addToPackages("sample.lift") LiftRules.httpAuthProtectedResource.prepend { - case (ParsePath("secure-basic" :: Nil, _, _, _)) => Full(AuthRole("admin")) + case (ParsePath("liftcount" :: Nil, _, _, _)) => Full(AuthRole("admin")) } LiftRules.authentication = HttpBasicAuthentication("lift") { diff --git a/samples-lift/src/main/scala/snippet/HelloWorld.scala b/samples-lift/src/main/scala/snippet/HelloWorld.scala index 75c0347ecd..aed272c0b2 100644 --- a/samples-lift/src/main/scala/snippet/HelloWorld.scala +++ b/samples-lift/src/main/scala/snippet/HelloWorld.scala @@ -1,4 +1,4 @@ -package eu.getintheloop.example.snippet +package sample.lift.snippet class HelloWorld { def howdy = Welcome to lift-akka at {new _root_.java.util.Date} diff --git a/samples-lift/src/main/webapp/index.html b/samples-lift/src/main/webapp/index.html index 41f9b1b7d8..aa25a1d91d 100644 --- a/samples-lift/src/main/webapp/index.html +++ b/samples-lift/src/main/webapp/index.html @@ -1,5 +1,15 @@ -

Welcome to your project!

-

+

Welcome to the Akka + Lift Sample

+

This page is served by Lift, and Lift alone. In order to demonstrate how AkkaServlet and
+ Lift can work in harmony we have supplied a sample JAX-RS service that is secured using
+ Lift's HTTP Basic Authentication.

+ +

To access the Akka service, visit this url and enter the + following access credentials:

+ +

user: someuser
+ password: 1234

+ +

diff --git a/samples-lift/src/main/webapp/templates-hidden/default.html b/samples-lift/src/main/webapp/templates-hidden/default.html index 412bcd9620..4a18c18f8a 100644 --- a/samples-lift/src/main/webapp/templates-hidden/default.html +++ b/samples-lift/src/main/webapp/templates-hidden/default.html @@ -1,15 +1,17 @@ - - - - - - eu.getintheloop.example:lift-akka:1.0-SNAPSHOT - - - - - - - + + + + + + Akka with Lift Example + + + +
+ + + +
+