views:

328

answers:

1

See guys my problem is not my application. Its working fine if i am logging in by one user, but when I am logging in by multiple user through through different user from different instances of IE8 browser my later session datas are overriding the formar one, this is b'coz both the IE browser are using same session id. Its 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 doesnt matter. In fact i want to mantain on session for each user.

Like when I am logging in gmail in one browser. If i am just typing gmail on another browser, Its logging in automatically. I dont want this in my application. I should get login by another user at a time i should perform independent operation.

My application is uses Struts, Spring, Hibernate & JBoss application server.

Now tell me how I should proceed ?

A: 

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/

Madabitjer
But thing is dat IE8 shares session across window also...I shares session not only tabs but also acoss new instances also...I just want 2 avoid dat one.
Idiot
And i cant say my user to use new session to use the application ? They are not going to understand dat one. so m in a dialema.
Idiot
Firstly, read the Servlet Specification (specially SRV.7.7.3) Client SemanticsSRV.7.7.3 Client SemanticsDue to the fact that cookies or SSL certificates are typically controlled by the Webbrowser process and are not associated with any particular window of the browser,requests from all windows of a client application to a servlet container might be partof the same session. For maximum portability, the Developer should always assumethat all windows of a client are participating in the same session.
Madabitjer
Secondly, you'd probably be able to do this using URL rewriting.Have a look at this post, I think the guy had the same problem :http://stackoverflow.com/questions/368653/how-to-differ-sessions-in-browser-tabs
Madabitjer

related questions