This week's book giveaway is in the Beginning Java forum.
We're giving away four copies of Get Programming with Java (MEAP only) and have Peggy Fisher on-line!
See this thread for details.
Win a copy of Get Programming with Java (MEAP only) this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Server caching problem  RSS feed

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Marshal
Posts: 67200
169
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Alenka Shtykel
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What can I do so that sessions were not getting confused? Has anyone ever encountered this problem. Thanks!
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I am going down to the lab. Do NOT let anyone in. Not even this tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!