I am developing a web application, in which I have used session management to store some values.
What I am looking for is, after a user login to the application by giving username and password, s/he will be on the home page, but at any moment if the user closes the browser window or pressed the back button, the session should get invalidated and the user should not get the home page again.
I am using servlet as controller for login(jsp) and 2 jsp pages, 1st-login page, 2nd- home page.
For timeout I am using web.xml's <session-timeout>
functionality.