在JSF-Richfaces-facelet中重定向会话超时 [英] Redirecting on session timeout in JSF-Richfaces-facelet

查看:103
本文介绍了在JSF-Richfaces-facelet中重定向会话超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用带有RichFacecs的JSF创建一个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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆