【发布时间】:2012-03-05 13:51:05
【问题描述】:
我有一个 JSF2 应用程序,我想在浏览器中只显示每个页面的域名。示例:
http://www.example.com/index.jsf 至 http://www.example.com
因此我这样配置 PrettyFaces:
<url-mapping id="index">
<pattern value="/" />
<view-id value="/index.jsf"/>
</url-mapping>
然后,我收到 404 错误消息“请求的资源 (/index.jsf/) 不可用。”
如果我尝试使用“/test”作为模式,那么它适用于 www.example.com/test。
以下文件存在于 web-root 中:
index.xhtml
index.html
index.html 包含重定向
<meta http-equiv="Refresh" content="0; URL=index.jsf">
非常感谢。
PS:PrettyFaces 3.3.2、JSF 2、PrimeFaces 3.1.1
编辑: 我搞定了! 我需要删除浏览器缓存。我不知道为什么......但它有帮助。无论如何,谢谢您的回答!
【问题讨论】:
-
您是否尝试过仅使用 index 而不是 index.jsf,因为您在 index.html 文件中有重定向
标签: jsf-2 url-rewriting prettyfaces