Listener for Session Expiration in Spring
12,317
Maybe SessionManagementFilter could help?
Or you can configure Spring Security to automatically redirect user if timeout occured: Detecting timeouts section.
Comments
-
Prashant almost 2 years
I am new to spring security and using it for authentication. I am facing a issue that when the browser is closed or in case of any unusual failure the session expires but I am unable catch the event so as to get the clean up code executed. I explore about it and found
HttpSessionEventPublisher
in Spring to captureHttpSessionDestroyedEvent
insessionDestroyed()
method but that is not called when I close the browser.Request to suggest solution for the same.
-
Prashant over 10 yearsSessionManagementFilter will help me trace and authenticate every request, but on closing browser no such request is send at server.
-
Prashant over 10 yearsi haven't tries this but what will happen if javascript is disable or if system crashes.
-
Human Being over 10 yearsJavaScript must to be enabled.Today, there is no web application without javascript.
-
Cem Sultan over 10 years@HyperLink Can this also be done using just JQuery without Ajax as our system just uses straight Spring MVC with direct client communication? Thanks.