Hello In my application I set username as a session attribute - 'username' But when I run the application in two different browser windows, both windows show same values for the 'username' attribute
Depending upon which browser you are using and how the browser instances are created, the browser instances may share cookies. Since sessions are maintained by an id value stored as a cookie, this means that any instances that share cokkies will share the session. [ November 04, 2007: Message edited by: Bear Bibeault ]
Originally posted by Vassili Vladimir: That's true, because it's the same session
Regards,
Thank you, Vassili
Pranav Pal
Ranch Hand
Joined: Nov 04, 2007
Posts: 74
posted
0
Originally posted by Bear Bibeault: Depending upon which browser you are using and how the browser instances are created, the browser instances may share cookies. Since sessions are maintained by an id value stored as a cookie, this means that any instances that share cokkies will share the session.
[ November 04, 2007: Message edited by: Bear Bibeault ]
Thank you, Bear
Pranav Pal
Ranch Hand
Joined: Nov 04, 2007
Posts: 74
posted
0
Originally posted by Pranav Pal:
Thank you, Bear
How do I assure that browser instances do not share cookies?
I believe that this primarily a problem with IE. If I recall, when you create a new instance from an existing window (as iwth ctrl-N), the instances will share cookies. If you create a new instance from the Start Menu, no sharing.
Check this before assuming that I'm remembering correctly.
Pranav Pal
Ranch Hand
Joined: Nov 04, 2007
Posts: 74
posted
0
Originally posted by Bear Bibeault: I believe that this primarily a problem with IE. If I recall, when you create a new instance from an existing window (as iwth ctrl-N), the instances will share cookies. If you create a new instance from the Start Menu, no sharing.
Check this before assuming that I'm remembering correctly.
Thanks.. If I open a new tab in existing window then only they are sharing cookies.. If I open two different windows then they do not share cookies..
I have another problem.. In a servlet I insert a row in the database Then I dispatch the request to a jsp If I refresh the jsp page in browser then the row is again unnecessarily inserted in the databse