• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with session management

 
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
When I login into some web application(with websphere) and capturing user id and putting that user info into session. It works well for one browser. If I open another browser and log into the application, instead of creating new session, my server is overriding existing session with new user.
What can be possible reasons for this?
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the browser instances share cookies, the sessions will be shared.
 
Rizwan Mohammad
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do I know whether browser instances share cookie or not? Is there any way to set this from browser?
Interestingly this happens only in my real websphere server not from my local machine test server. Is this setting should be set from server side?
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, there is no server-side setting. The browsers each have there own rules about cookie sharing.

IE, for example, will share cookeies amongst all instance spawned from a window (either through window.open, or the user using ^N or the File menu). Instance created from the desktop icon or strat menu will not. Go figure.
 
Rizwan Mohammad
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thats what I thought initially. But it is sharing same session even though IE is creted newly from start menu.Any idea why it is happening?
 
Rizwan Mohammad
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From different browser instances it gives different JSESSIONID cookie but they have same session id(request.getSession.getID()). First IE returns session as new but second instance returns sesssion as old(session.isNew() == false).
What are the scenarios, in which this case can happen?
reply
    Bookmark Topic Watch Topic
  • New Topic