• Post Reply Bookmark Topic Watch Topic
  • New Topic

Session Problem?

 
Ragav Seth
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a serious problem on hand.I have this scenario.

User1 logs into my application,sees screen 1.
User 2 logs into my application,sees screen 2.

Now user1 clicks on some link in my application and he sees the page seen by the user2.So he sees whatever page that was last accessed and not what he should be seeing.

I see in the tomcat admin application that 2 sessions are being created for the 2 users.

Does the problem arise because the user clicks an ahref link inside the application and the application loses state?

Iam not using any framework like struts.Iam using plain Jsp,servlets.

I dont think using the same connection object will cause this problem.

so wondering what this problem could be.

any idea to stimulate my brains?
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do your Servlets or JSPs have any instance variables?
 
Ragav Seth
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes they do.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then that's the problem. Get rid of them. They are not thread-safe and your data is getting shared amongst all the simultaneous requests.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!