• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Finding Session and Killing it

 
bhuvi mdu
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have 2 browsers which logged in(www.yahoo.com) by same users Say XXX. I need to find the first browser session and kill it, i donno how to find the first browser's session.


-bhuvi
 
Srinivasa Raghavan
Ranch Hand
Posts: 1228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a work around ( might be not a direct solution ).
Keep a variable in the session that is set for the first instance. Store the session Id in the variable compare the session id with the current sessionid of the application. If the session Id matches then kill it or do what ever you want.
 
bhuvi mdu
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

You are saying that if the session id matches kill it, does it mean that same session id will be maintained for the same user eventhough he log in different browser.

-bhuvi
 
Srinivasa Raghavan
Ranch Hand
Posts: 1228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Session variable is common across browser but if you open a new browser window then it has a different sessionId.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic