session.invalidate()IllegalStateException [英] session.invalidate() IllegalStateException

查看:235
本文介绍了session.invalidate()IllegalStateException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使会话无效。当我打电话:

  session.invalidate()

它抛出


java.lang.IllegalStateException:getLastAccessedTime:Session has invalidated


任何想法为什么?

解决方案

您可以使用HttpSessionListener了解哪里和何时会话超时或无效之前,您将自动呼叫无效。


I'm trying to invalidate a session. When I call:

session.invalidate()

it throws

java.lang.IllegalStateException: getLastAccessedTime: Session already invalidated

Any idea why? I can see the session and it's values just before the invalidate line.

解决方案

You can use an HttpSessionListener to understand where and when the Session is timing-out or getting invalidated before you call the invalidate yourself.

这篇关于session.invalidate()IllegalStateException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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