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

发布于 2024-09-16 01:33:15 字数 1713 浏览 3 评论 0原文

我正在尝试在 Google App Engine 上使用 Lift 2.1-SNAPSHOT,但 HTML 中的 lift 代码片段未得到处理。它只是返回 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 是simple 按原样返回 lift.html,而不处理标签。

知道为什么标签没有被处理吗?没有任何日志记录可以提示出现问题。

问候, 下吕

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

九歌凝 2024-09-23 01:33:15

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

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

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

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文