重写不是 LiftRules 的成员

发布于 2024-09-03 11:07:41 字数 2522 浏览 4 评论 0原文

我正在关注 http://www.assembla.com/wiki/show/liftweb/URL_Rewriting liftweb 中的 url 重写教程.. 但我收到此错误:

error: value rewrite is not a member of object net.liftweb.http.LiftRules

.. 这真的很奇怪.. 并且文档说它存在。

我正在使用idea IDE,并且我使用 lift maven Blank archifact 从头开始​​完成了所有事情。

更多信息:

[INFO] ------------------------------------------------------------------------
[INFO] Building Joseph3
[INFO]    task-segment: [tomcat:run]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing tomcat:run
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO] [yuicompressor:compress {execution: default}]
[INFO] nb warnings: 0, nb errors: 0
[INFO] artifact org.mortbay.jetty:jetty: checking for updates from scala-tools.org
[INFO] artifact org.mortbay.jetty:jetty: checking for updates from central
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [scala:compile {execution: default}]
[INFO] Checking for multiple versions of scala
[INFO] /home/dpz/Scala/Doit/Joseph3/src/main/scala:-1: info: compiling

[INFO] Compiling 2 source files to /home/dpz/Scala/Doit/Joseph3/target/classes at 1274922123910
[ERROR] /home/dpz/Scala/Doit/Joseph3/src/main/scala/bootstrap/liftweb/Boot.scala:16: error: value rewrite is not a member of object net.liftweb.http.LiftRules
[INFO]     LiftRules.rewrite.prepend(NamedPF("ProductExampleRewrite") {
[INFO]               ^
[ERROR] one error found
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] wrap: org.apache.commons.exec.ExecuteException: Process exited with an error: 1(Exit value: 1)

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19 seconds
[INFO] Finished at: Thu May 27 03:02:07 CEST 2010
[INFO] Final Memory: 20M/175M
[INFO] ------------------------------------------------------------------------

Process finished with exit code 1

enter code here

I was following http://www.assembla.com/wiki/show/liftweb/URL_Rewriting tutorial for url rewritting in liftweb.. but I get this error:

error: value rewrite is not a member of object net.liftweb.http.LiftRules

.. it is really odd.. and the documentation says that it exists.

I'm using idea IDE, and I've done everything from scratch, using the lift maven blank archifact.

Some more info:

[INFO] ------------------------------------------------------------------------
[INFO] Building Joseph3
[INFO]    task-segment: [tomcat:run]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing tomcat:run
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO] [yuicompressor:compress {execution: default}]
[INFO] nb warnings: 0, nb errors: 0
[INFO] artifact org.mortbay.jetty:jetty: checking for updates from scala-tools.org
[INFO] artifact org.mortbay.jetty:jetty: checking for updates from central
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [scala:compile {execution: default}]
[INFO] Checking for multiple versions of scala
[INFO] /home/dpz/Scala/Doit/Joseph3/src/main/scala:-1: info: compiling

[INFO] Compiling 2 source files to /home/dpz/Scala/Doit/Joseph3/target/classes at 1274922123910
[ERROR] /home/dpz/Scala/Doit/Joseph3/src/main/scala/bootstrap/liftweb/Boot.scala:16: error: value rewrite is not a member of object net.liftweb.http.LiftRules
[INFO]     LiftRules.rewrite.prepend(NamedPF("ProductExampleRewrite") {
[INFO]               ^
[ERROR] one error found
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] wrap: org.apache.commons.exec.ExecuteException: Process exited with an error: 1(Exit value: 1)

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19 seconds
[INFO] Finished at: Thu May 27 03:02:07 CEST 2010
[INFO] Final Memory: 20M/175M
[INFO] ------------------------------------------------------------------------

Process finished with exit code 1

enter code here

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

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

发布评论

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

评论(1

零崎曲识 2024-09-10 11:07:41

请使用Lift 2.0-RC1。 wiki 文章基于 Lift 2.0。

Please user Lift 2.0-RC1. The wiki article is based on Lift 2.0.

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