漂亮的面孔映射问题

时间:2010-10-15 13:32:46

标签: jsf prettyfaces

我使用PrettyFaces for 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 会发生什么事?

在prettyfaces的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.

1 个答案:

答案 0 :(得分:1)

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