在 JSF-Richfaces-facelet 中重定向会话超时 [英] Redirecting on session timeout in JSF-Richfaces-facelet
本文介绍了在 JSF-Richfaces-facelet 中重定向会话超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 JSF 和 RichFacecs 创建一个 Web 门户.我想在会话超时时将用户重定向到登录页面.我试图在会话到期/注销阶段抛出 SecurityException 如下
I am using JSF with RichFacecs to create a web portal .I want to redirect the user to the login page on session time out. I was trying to throw a SecurityException in session expiry/logged out stage as follows
<error-page>
<exception-type>java.lang.SecurityException</exception-type>
<location>/Login.jsf</location>
</error-page>
但这对我不起作用.处理这个问题的正确方法是什么?
But this is not working for me. Which is the right way of handling this ?
推荐答案
应该这样做:
<error-page>
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
<location>/sessionExpired.jsf</location>
</error-page>
这篇关于在 JSF-Richfaces-facelet 中重定向会话超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文