Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Same SessionId for two logins!

 
M K Rayapudi
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
In my web application,
If I login from different machines on the LAN, I am getting different Session Id's.
But, if I login from two different windows of on One machine, I am getting same session Id.
Is there a way to get different Session Id's, even if we login from the same machine (two instances of Browser) ?
Please Help.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

But, if I login from two different windows of on One machine, I am getting same session Id.

If you access your web application from a browser that supports tabs the tabs will share the same session id because the browser instance is the same. If you open a new instance of IE from an existing instance (i.e. by hitting CTRL+N) the behaviour is the same. If you open two instances of a browser from the start menu you will get two distinct session ids.

I suppose you need to ask yourself "does it matter"?
 
M K Rayapudi
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you for your response,

I suppose you need to ask yourself "does it matter"?

of course,
but, this is my assignment.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, so I'd ask whoever gave you the assignment what problem they are asking you to find a solution to. One person using one PC may have many browsers windows open, why do they require them to have a different login for each one displaying your application?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could look at Seam to see how it supports multiple conversations under the same session.
 
M K Rayapudi
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you (all) don't think as I am annoying you,
I found "Optional extension of identifier field used to differentiate concurrent uses of the same session identifier". at this link.
But, I am unable to find any solution by going through the J2EE API.
If there is any possible solution, please help.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic