It's not a secret anymore!
The moose likes Servlets and the fly likes Session Management Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Session Management" Watch "Session Management" New topic

Session Management

Prabhu Chandrasekaran
Ranch Hand

Joined: Oct 14, 2000
Posts: 36
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,
Kapil Agrawal

Joined: Nov 03, 2000
Posts: 11
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

Joined: Oct 17, 2000
Posts: 68
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
I agree. Here's the link:
subject: Session Management
It's not a secret anymore!