I already tried with window.onunload() but it is not working in my case.Because it is generated even I click on back button or any other activity. If not, then Is there any ground work which is work in chrome, Mozilla and IE as well?I felt that there should be a way to do it from Java Script; unfortunately, Java Script doesn't seem to have an handler that you want.The problem is you want a page to be 'loaded' when the window is closing.In order to load a page you have to have a window....I require this functionality wherein when the user clicks on the back button of the browser, the session is invalidated and an error page is shown.
is been set to 180 seconds and I want it like that only.
Hi akhilesh tripathi welcome to Javaranch, Is this a JSP question? one of the moderators will move it to its proper place.
See Java World's handling of this for more information.
When I logout from my application at that time I am able do the clean activity as well as session.invalidate().
This should also happen when the user clicks on refresh. Originally posted by akhilesh tripathi: when the user clicks on the back button of the browser, the session is invalidated and an error page is shown.