google-app-engine - 在带有 Scala 2.8 的 Google App Engine 上使用 Lift 2.1

标签 google-app-engine scala scala-2.8 lift

我正在尝试在 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/

相关文章:

google-app-engine - locationId "europe-west"代表比利时还是欧盟的多区域?

java - objectify/google 应用引擎中的外键

java - Google App Engine 数据存储区不实时运行,而是在本地运行

scala - 增加 Scala 的 JVM 堆大小?

scala - 使用 Dispatch 执行简单的 HTTP GET

scala - Scala 集合转发器和代理的用例

python - Google Sheet API 4 - 我们可以访问 Google Drive 中 App Engine 应用程序创建的文件吗?

java - Apache Spark GraphX java.lang.ArrayIndexOutOfBoundsException

Scalaz:请求 Cokleisli 组合的用例

ide - 适用于 Scala 2.8 的 IDE?