How to avoid session sharing wch is adopted by IE8?
My problem is not my application. It is working fine if I am logging in with one user, but when I am logging in by multiple users through different user from different instances of IE8 browser my later session data are overriding the former one. This is because both of the IE browsers are using same session id. It is happening because of session sharing of IE8. There is only one session is maintained for one application by how many user I am logging in does not matter. In fact I want to maintain one session for each user.
Like when I am logging in gmail in one browser. If type gmail on another browser, it is logging in automatically. I do not want this in my application. I should get a login by another user at the time I perform开发者_如何学C an independent operation.
My application is uses Struts, Spring, Hibernate & JBoss application server.
Now tell me how I should proceed ?
The default behavior for IE is to share session data between your tabs.
Imagine it didn't: Your user logs into your site, see two pages he want's to view and opens them in new tabs. If the session data for the UserId no lobger existed he would see an error or be redirected to you login page again (depends on your configuration though).
If you're just testing things yourself: 1. Try File > New Session 2. Try multiple InPrivate windows (doubt this though).
If you need this is functionality for you users, you might want to have a look at : http://javapapers.com/servlet/explain-the-methods-used-for-session-tracking/
精彩评论