漂亮面孔映射问题
我使用 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.
i using PrettyFaces for Pretty URL
but i have first problem with PrettyFaces:
my mapping in pretty-config.xml
<url-mapping id="home">
<pattern value="/" />
<view-id>/faces/index.jsf</view-id>
</url-mapping>
i have one file index.xhtml
when deploy on server url http://localhost/myproject
it not found index.jsf
what's happen ?
mapping in web.xml of 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 Message for problem
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
index.jsf
文件不存在。将其放置在项目的根目录中 (http://localhost/myproject/index.jsf)。The
index.jsf
file doesn't exist. Make it in the root directory of your project (http://localhost/myproject/index.jsf).