我正在使用JSF 2.0创建登录表单.以下是详细说明.
当我运行表单时,我得到login.xhtml
一旦我成功登录,我得到页面为temp1.xhtml,当我点击链接(我在temp1.xhtml页面上创建)时,我得到temp2.xhtml页面.
一切都很完美...但URL的问题如下所述......
当我成功登录时,如果是temp1.xhtml,浏览器仍会将URL显示为login.xhtml
当我点击temp1.xhtml上的链接时,我得到temp2.xhtml页面,但是网址是temp1.xhtml而不是temp2.xhtml
任何人都可以帮我显示正确的URL,因为我必须过滤这些页面,因为URL是INCORRECT我的过滤器是无用的...
请注意,我没有使用配置文件来指导页面...
你必须添加:
?faces-redirect=true 在你正在指导的观点的最后.
例如:
return "mypage?faces-redirect=true"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1550 次 |
| 最近记录: |