• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

JSP SESSION MANAGEMENT

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).]
 
Would anybody like some fudge? I made it an hour ago. And it goes well with a tiny ad ...
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic