我正在尝试在 Google App Engine 上使用 Lift 2.1-SNAPSHOT,但未处理 HTML 中的提升片段。它只是返回 HTML 文件。
这是 lift.html 文件(只是一个简单的测试):
<lift:surround with="default" at="content">
Welcome to your Lift application
</lift:surround>
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>
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>
使用“/opt/appengine-java-sdk-1.3.6/bin/dev_appserver.sh target/kivanotify”运行项目并访问 url http://localhost:8080/lift.html 时很简单,按原样返回 lift.html,不处理标签。
知道为什么标签没有被处理吗?没有提示问题的日志记录。
问候, 下吕
最佳答案
我记得您需要在 appengine-web-app.xml 中进行以下设置。
<static-files>
<exclude path="/**" />
</static-files>
顺便说一句,我发现 stax.net 比 GAE 更适合 Lift。
关于google-app-engine - 在带有 Scala 2.8 的 Google App Engine 上使用 Lift 2.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3563571/