I am creating one application in struts2.
In this I am facing one challenge in session management.
What I need :
If user first time open login page in IE browser, then I want to show login.jsp
page where user will enter username and password. After giving login credentials successfully, I am
storing one attribute such as data in session scope using session.setAttribute("data","Hello");
Here I am using tomcat persistence JDBC base store. I am able to store session id and it's data in database.
Scenario : Due to some network problem or server problem, we restart the server forcefully. At this time may be client can close browser at their side thinking this way that I am already logged in so where I left a page, from that onward my session will start because session is persisted in database using tomcat persistence manager.
Problem : I am getting the same session with data, if I restart the server but do not close the browser. And if I close the browser after server restart I am unable to proceed with the existing session. Still my database is having the previous session data and when i am trying to display on console i am getting the previous session id but unable to skip login page process.
Please help me!
thanks.