Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session Management

 
Prabhu Chandrasekaran
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Friends,
I have a problem. We, a team of 5 have designed a system using servlets, java, javascript and oracle.
In this we are using sessions to manage user logins. In this system, according to the user's privelages, screens will be displayed or controlled. The users privelages are maintained in the session as variables.
Sometimes, it so happens that when some user logs out and another logs in, the previous users screens are displayed on screen. This happens only once in a time but can be crucial to the success of this system.
The session variables have been properly refreshed and my doubt is in Internet Explorers caching feature which stores a copy of frequently visited pages in the clients machine.
Please help me as soon as possible regarding this.
Advance Thanks,
Prabhu.V.C
------------------
 
Kapil Agrawal
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We had a similar system and the way we used to handle user specific screen was that every servlet( before sending the control to jsp page) would get the user id from cookie, and all the information will be displayed according to that id. Now if the user has not logged in, then there would be no cookie and hence a general information page would be displayed. Once the user logs in, the cookie will be generated(with lifetime equal to session time), and the user can see the information related to his id, and if he decides to log out, then the servlet would remove the cookie, hence jsp won't be able to find old information.
 
ram mohan
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you believe this is a cashing problem why don't u block cashing in the client mechine.Add this in the servlet which stop cashing
//cash control directives
response.setHeader("Cache-Control","no-cache");
response.setHeader("Cache-Control","no-store");
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic