Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Lift 2.1 on Google App Engine with Scala 2.8

I'm trying to use Lift 2.1-SNAPSHOT on Google App Engine but the lift snippets in the HTML are not being processed. It simply returns the HTML file.

This is the lift.html file (just a simple test):

<lift:surround with="default" at="content">
  Welcome to your Lift application
</lift:surround>

The web.xml has:

<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>

The appengine-web.xml contains:

<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
    <application>kivanotify</application>
    <version>6</version>
    <static-files/>
    <resource-files/>
    <system-properties>
        <property name="java.util.logging.config.file" value="WEB-INF/classes/logging.properties"/>
    <property name="in.gae.j" value="true" /> 
    </system-properties>
    <sessions-enabled>true</sessions-enabled>
    <static-files> 
        <exclude path="/static/**" /> 
    </static-files> 
</appengine-web-app>

When running the project using " /opt/appengine-java-sdk-1.3.6/bin/dev_appserver.sh target/kivanotify" and accessing the url http://localhost:8080/lift.html is simple returns the lift.html as is without processing the tags.

Any idea why the tags are not being processed? There is no logging that hints at a problem.

Regards, Gero

like image 788
Gero Avatar asked Oct 15 '22 01:10

Gero


1 Answers

I remember you need the following setting in appengine-web-app.xml.

  <static-files>
    <exclude path="/**" />
  </static-files> 

BTW, I found stax.net is much Lift-friendly then GAE.

like image 133
Brian Hsu Avatar answered Dec 02 '22 01:12

Brian Hsu