File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes HttpSession sharing between browser instances on same machine! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "HttpSession sharing between browser instances on same machine!" Watch "HttpSession sharing between browser instances on same machine!" New topic
Author

HttpSession sharing between browser instances on same machine!

selva raja
Ranch Hand

Joined: Nov 24, 2009
Posts: 69
Dear All,

I think know issues for everyone.

My application is running in Spring MVC.I have below problem.

A user (USER A) logged-in to the site. After successful log-in, we have UserProfile object in session and we display username on browser title.

Another user (USER B) logged -in to the site. After his successful login, his username details displayed in his browser title-bar.

Problem is, if now I refresh the browser of USER A then, USER B username details get displayed in his browser title-bar. (USER B details displayed on USER A page)

This is banking application,so that customer need to login different userid at the same time.Please provide your comments to solve this issue.

Thanks in advance,
selva
Karthik Shiraly
Ranch Hand

Joined: Apr 04, 2009
Posts: 513
    
    6
This is banking application,so that customer need to login different userid at the same time.

What is the use case?
In my opinion, relying on IE's inprivate browsing / chrome's incognito mode / firefox's whatever-it's-called for correct behaviour is bad both from usability and from security aspects.
Most users won't be so browser savvy as to know how these work under the hood. For most, a new window is a new window, regardless of whether it's opened using Ctrl+N or from start menu or Ctrl+shift+N, and they expect them all to behave the same.



Saifuddin Merchant
Ranch Hand

Joined: Feb 08, 2009
Posts: 606

There some good info here.
The standard answer though is that it is not possible (not without a lot of hacks, at least). You case may be more relaxed (intranet app, limited users) and you maybe have some liberty to make assumptions.
Still that's not the way web browsers were supposed to function, its a bad requirement....


Cheers - Sam.
Twisters - The new age Java Quiz || My Blog
Miku Ranjan
Ranch Hand

Joined: Oct 11, 2011
Posts: 98
Hi,
Are you using same browser to login with two user ?
 
Don't get me started about those stupid light bulbs.
 
subject: HttpSession sharing between browser instances on same machine!