This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

JSP SESSION MANAGEMENT

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
We have hosted an internet application lately. We have run into session problems. THe session of one user(client) is getting transferred to some other user(client).
Iam setting the session in the first page with an user id saying session.put(userid,somevalue)
And i check in each page whether this is the correct value.
Somehow the session id of one user is getting transferred to 2 to 3 users. Websphere is our JSP server.
Can anybody help on this....
Thanks,
Mahesh
 
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mahesh,
HOw did you test? By 'Somehow the session id of one user is getting transferred to 2 to 3 users' , do you mean, one user is able to see other user related data which are put in session?
If so it could be static/instance vars problem of servlets. If you want each user to have unique session data, those session objects must be local vars inside doGet or doPost in case of Servlet, NOT instance or static vars, since static and instance vars are shared between all user requests.
In case of JSP, they must be declared within <% %> tags NOT within <%! %> tags.
regds
maha anna
[This message has been edited by maha anna (edited March 26, 2001).]
 
Do the next thing next. That’s a pretty good rule. Read the tiny ad, that’s a pretty good rule, too.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic