session.invalidate() IllegalStateException

落花浮王杯 提交于 2020-01-16 03:25:10

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/6055187/session-invalidate-illegalstateexception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!