Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multiple User Sessions getting Mixed

 
san
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have developed an web application that is accessed by multiple users (say 1000) concurrently. It is developed using struts framework and entire session tracking is done using HttpSession object. Now the problem is -
- the application is opened in two sepearte browser instances on the same machine.
- Two different userIds are used to log in.
- After continuously working within two application, some times the user data is inter-mixed; i.e. values specific to say user1 starts getting displayed for user2 or vice-a-versa.
 
alan do
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
make sure that all local variables are declared INSIDE the execute method of your action. also, if you manipulate cookies to obtain information, testing browser sessions should be done on different computers, not simply by openning another browser.
 
san
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
all local variables are declared INSIDE the execute method of action class still
 
sreenath reddy
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi san

are u sure that the second window is not opened either by suing Ctrl-N button because that will have the same sessio as the old one even though logged in user might be diff

and if u havent used instance variables in ur action class .dont know might be some problem with ur code

The above 2 are the only valid reasons for data inconsistancy
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by san:
all local variables are declared INSIDE the execute method of action class still


"san",

Welcome to JavaRanch. We don't have many rules here, but we do have a naming policy which we try to strictly enforce. Please re-read this document and edit your display name in order to comply. Thanks in advance, and we look forward to seeing you around the Ranch.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic