漂亮的面孔映射问题
问题描述:
我使用PrettyFaces为漂亮的URL 但我有PrettyFaces第一个问题:我的 映射漂亮-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
<!-- 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的消息的web.xml中为问题
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.
答
index.jsf
的文件不存在。把它放在项目的根目录下(http://localhost/myproject/index.jsf)。
+0
我改为index.xhtml – MYE 2010-10-16 03:32:36
如果你删除漂亮的面孔的东西,那么它的工作? – 2010-10-18 08:05:08
不,我只是改变 /faces/index.jsf 到 /faces/index.xhtml –
MYE
2010-10-18 09:07:49