使用Scala 2.8在Google App Engine上使用Lift 2.1

Ger*_*ero 5 google-app-engine scala lift scala-2.8

我正在尝试在Google App Engine上使用Lift 2.1-SNAPSHOT,但HTML中的电梯片段尚未处理.它只返回HTML文件.

这是lift.html文件(只是一个简单的测试):

<lift:surround with="default" at="content">
  Welcome to your Lift application
</lift:surround>
Run Code Online (Sandbox Code Playgroud)

web.xml有:

<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>
Run Code Online (Sandbox Code Playgroud)

appengine-web.xml包含:

<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>
Run Code Online (Sandbox Code Playgroud)

使用"/opt/appengine-java-sdk-1.3.6/bin/dev_appserver.sh target/kivanotify"运行项目并访问url http:// localhost:8080/lift.html很简单时返回lift.html因为没有处理标签.

知道为什么标签没有被处理?没有记录提示问题的日志记录.

此致,Gero

Bri*_*Hsu 4

我记得您需要在 appengine-web-app.xml 中进行以下设置。

  <static-files>
    <exclude path="/**" />
  </static-files> 
Run Code Online (Sandbox Code Playgroud)

顺便说一句,我发现 stax.net 比 GAE 对 Lift 更友好。