【问题标题】:Pretty Faces Mapping problem漂亮的面孔映射问题
【发布时间】:2010-10-15 13:32:45
【问题描述】:

我使用 PrettyFaces 作为 Pretty URL 但我对 PrettyFaces 有第一个问题: 我在 pretty-config.xml 中的映射

     <url-mapping id="home">
  <pattern value="/" />
  <view-id>/faces/index.jsf</view-id>
  </url-mapping>

我有一个文件 index.xhtml 在服务器 url http://localhost/myproject 上部署时 它没有找到 index.jsf 发生了什么?

漂亮面孔的 web.xml 中的映射

<!-- PrettyFaces-->

<filter>
    <filter-name>Pretty Filter</filter-name>
    <filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>
</filter>

<filter-mapping>
 <filter-name>Pretty Filter</filter-name>
 <url-pattern>/*</url-pattern>
 <dispatcher>FORWARD</dispatcher>
 <dispatcher>REQUEST</dispatcher>
 <dispatcher>ERROR</dispatcher>
</filter-mapping>





<!-- End PrettyFaces-->

GlassFish 问题消息

HTTP Status 404 - /index.jsf not found

type Status report

message/index.jsf not found

descriptionThe requested resource (/index.jsf not found) is not available.

【问题讨论】:

  • 如果你删除漂亮的面孔,那么它是否有效?
  • 不,我只是将 /faces/index.jsf 更改为 /faces/index.xhtml

标签: jsf prettyfaces


【解决方案1】:

index.jsf 文件不存在。将其放在项目的根目录中 (http://localhost/myproject/index.jsf)。

【讨论】:

    猜你喜欢
    • 2014-03-13
    • 2012-01-26
    • 2011-05-25
    • 2015-03-30
    • 2010-11-18
    • 2012-10-18
    • 1970-01-01
    • 2017-09-13
    • 1970-01-01
    相关资源
    最近更新 更多