Merge branch 'master' of git@github.com:jboner/akka into cassadra_rewrite

This commit is contained in:
jboner 2009-08-11 13:13:39 +02:00
commit 1bd2abf908
5 changed files with 51 additions and 17 deletions

View file

@ -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") {

View file

@ -1,4 +1,4 @@
package eu.getintheloop.example.snippet
package sample.lift.snippet
class HelloWorld {
def howdy = <span>Welcome to lift-akka at {new _root_.java.util.Date}</span>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<filter>
<filter-name>LiftFilter</filter-name>
<display-name>Lift Filter</display-name>
<description>The Filter that intercepts lift calls</description>
<filter-class>net.liftweb.http.LiftFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>LiftFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>AkkaServlet</servlet-name>
<servlet-class>se.scalablesolutions.akka.kernel.jersey.AkkaServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>AkkaServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>

View file

@ -1,5 +1,15 @@
<lift:surround with="default" at="content">
<h2>Welcome to your project!</h2>
<p><lift:helloWorld.howdy /></p>
<h2>Welcome to the Akka + Lift Sample</h2>
<p>This page is served by Lift, and Lift alone. In order to demonstrate how AkkaServlet and <br />
Lift can work in harmony we have supplied a sample JAX-RS service that is secured using <br />
Lift's HTTP Basic Authentication.</p>
<p>To access the Akka service, visit <a href="/liftcount">this url</a> and enter the
following access credentials:</p>
<p>user: <strong>someuser</strong><br />
password: <strong>1234</strong></p>
<p><lift:HelloWorld.howdy /></p>
</lift:surround>

View file

@ -1,15 +1,17 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:lift="http://liftweb.net/">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<title>eu.getintheloop.example:lift-akka:1.0-SNAPSHOT</title>
<script id="jquery" src="/classpath/jquery.js" type="text/javascript"></script>
</head>
<body>
<lift:bind name="content" />
<lift:Menu.builder />
<lift:msgs/>
</body>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<lift:CSS.blueprint />
<title>Akka with Lift Example</title>
<script id="jquery" src="/classpath/jquery.js" type="text/javascript"></script>
</head>
<body>
<div class="container">
<lift:bind name="content" />
<lift:Menu.builder />
<lift:msgs/>
</div>
</body>
</html>