wood burning stoves*
The moose likes JSP and the fly likes Server caching problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "Server caching problem" Watch "Server caching problem" New topic
Author

Server caching problem

Alenka Shtykel
Greenhorn

Joined: Oct 24, 2003
Posts: 16
I am currently working on development of an application in jsp/java. However, I have a problem, which I am not sure how to solve. If I open two browsers on the same computer and login into application as two different users, after some clicks, one of the users becomes the other user. In other words, both browsers will now display his or her name at the top.. and both will have access to the same functionality. This is very dangerous as I want to restrict certain users from accessing certain functions. Refreshing the page doesn't work, so I was thinking that maybe it's a server-side caching. Does anyone have any ideas? Please help! Thank you very much.
Best,
Alenka
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61314
    
  66

This is most likely because the browser instances are sharing cookies. Since a cookie is used to maintain the session, the instances are getting their sessions confused.
IE is strange in that some browser instances share cookies, and others do not. It all depends on how you spawned the instances.
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Alenka Shtykel
Greenhorn

Joined: Oct 24, 2003
Posts: 16
What can I do so that sessions were not getting confused? Has anyone ever encountered this problem. Thanks!
Wally Schnok
Greenhorn

Joined: May 31, 2001
Posts: 29
the problem is how do you do to maintain sessions ?!
if using cookies could happen what Bear said .....
in other cases, is just strrrrraaaaaaaaaaaaange , there is a problem in your architecture , try to put in session the userId logged and....build any page after checking the user logged value in session :-)))
w.s.
 
GeeCON Prague 2014
 
subject: Server caching problem