IceFaces 会话过期导致异常
我的 IceFaces 应用程序在会话到期时崩溃。它没有显示“用户会话已过期”或“网络连接中断”消息。
我的猜测是再次加载同一页面,并且由于后备 bean 代码找不到会话变量,因此它会抛出以下异常:
exception
javax.servlet.ServletException: java.lang.Exception: javax.faces.FacesException: Problem in renderResponse: /main-template.jspx: User session has expired or it was invalidated.
root cause
java.lang.Exception: javax.faces.FacesException: Problem in renderResponse: /main-template.jspx: User session has expired or it was invalidated.
root cause
javax.faces.FacesException: Problem in renderResponse: /main-template.jspx: User session has expired or it was invalidated.
root cause
javax.el.ELException: /main-template.jspx: User session has expired or it was invalidated.
root cause
com.icesoft.faces.webapp.http.core.SessionExpiredException: User session has expired or it was invalidated.
root cause
java.lang.IllegalStateException: PWC2778: getAttribute: Session already invalidated
异步更新已开启,并且 jsp 页面具有
组件。
关于如何阻止这种情况发生有什么想法吗?
注意:我做了很多奇特的事情,比如在会话超时时重定向,以及显示 java.lang.Throwable 的错误页面,但我已经将其全部注释掉了 - 运气不好。当重定向和错误处理都打开时,应用程序第一次会显示错误页面,然后在一段时间后重定向到“会话到期”页面。
谢谢
My IceFaces application crashes on session expiry. It's not showing the "User Session Expired" or "Network Connection Interrupted" message.
My guess is the same page is loaded again, and since the backing bean code cannot find the session variables, it throws the following exception:
exception
javax.servlet.ServletException: java.lang.Exception: javax.faces.FacesException: Problem in renderResponse: /main-template.jspx: User session has expired or it was invalidated.
root cause
java.lang.Exception: javax.faces.FacesException: Problem in renderResponse: /main-template.jspx: User session has expired or it was invalidated.
root cause
javax.faces.FacesException: Problem in renderResponse: /main-template.jspx: User session has expired or it was invalidated.
root cause
javax.el.ELException: /main-template.jspx: User session has expired or it was invalidated.
root cause
com.icesoft.faces.webapp.http.core.SessionExpiredException: User session has expired or it was invalidated.
root cause
java.lang.IllegalStateException: PWC2778: getAttribute: Session already invalidated
Asynchronous updates are on, and the jsp page has the <ice:outputConnectionStatus />
component.
Any ideas on how to stop this from happening?
Note: I was doing a lot of fancy stuff, like redirecting on session timeout, and displaying error pages for java.lang.Throwable, but I've commented it all out - without luck. When both redirection and error-handling were switched on, on the first time the application would show the error page, then after a while redirect to "session-expiry" page.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我对 RichFaces 也遇到了同样的问题,这个答案救了我:
jsf 登录超时
很多我建议您查看此博客的转身和奇怪的事情:
http://balusc.blogspot.com/
这是我当前使用的代码:
您还必须将其放入 faces-config.xml 中:
I had the same problem with RichFaces and this answer saved me :
jsf login times out
For a lot of turn around and stranges things I recommend to see this blog :
http://balusc.blogspot.com/
Here is the code I'm currently using :
You also have to put this in faces-config.xml :