开发者

Spring Security - possible to restore a lost session?

I'm storing the user's unsaved changes as session attributes. This way, if the browser is closed accidentally no data will be lost. However, in some cases this won't help: computer shutting down unexpectedly before the cookie is flushed to the disk; user using a different browser or computer; browser cache being c开发者_Go百科leared, etc.

It would be useful to be able to restore a previous session when the user logs back on, even if the JSESSIONID is not available anymore. I know you can manage concurrency with Spring Security which seems quite similar, but is this possible?


I'm not certain a session can be "restored", however a user's session does expire when the browser is closed. You may be able to recover the information from within it with a custom class that implements HttpSessionBindingListener.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜