1

Pretty URL に PrettyFaces を使用していますが、PrettyFaces に最初の問題があります: pretty-config.xml でのマッピング

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

サーバー URL http://localhost/myprojectにデプロイすると、1 つのファイル index.xhtml があります。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.
4

1 に答える 1

1

index.jsfファイルが存在しません。プロジェクトのルートディレクトリ(http://localhost/myproject/index.jsf)に作成します。

于 2010-10-15T22:46:20.780 に答える