wood burning stoves 2.0*
The moose likes Servlets and the fly likes Same SessionId for two logins! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Same SessionId for two logins!" Watch "Same SessionId for two logins!" New topic
Author

Same SessionId for two logins!

M K Rayapudi
Ranch Hand

Joined: Feb 19, 2007
Posts: 157
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.


R6i
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


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"?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
M K Rayapudi
Ranch Hand

Joined: Feb 19, 2007
Posts: 157
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

Joined: Apr 14, 2004
Posts: 10336

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

Joined: Sep 29, 2008
Posts: 12617

You could look at Seam to see how it supports multiple conversations under the same session.
M K Rayapudi
Ranch Hand

Joined: Feb 19, 2007
Posts: 157
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.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Same SessionId for two logins!
 
Similar Threads
Maintaining Unique Sessions in JSP
Session management configuaration Issue
same sessionid
Session identification
sendRedirect (), forword ()