Hi all, i have a doubt with regard to sessions below is the case which i had noticed.
I have created a webapplication (it is in beginning stage) with 2 JSP's index1.jsp & index2.jsp and a servlet which acts as a dispatcher to all the JSP's (i.e all the request will bypass only through this servlet)
I had given the following statement in the servlet service method
Now when i open the same page in my webapplication in multiple windows & Tabs using Mozilla it gives the same session id but the same is not the case when i do with IE for each and every window and i open it gives a different session id.
What is the reason behind it???
In some cases IE retunrs session id has null.
When i open my application in IE tab of mozilla all the IE tab returns the same session id which is different from mozilla tab.
I'am confused over it. Pls. explain.
I had not given any statments like getSession / getSession(true) in my application.
MSIE behaves differently, in regard to session cookies, depending on how the window was spawned.
If, you open a new window by clicking on Start -> programs -> MSIE, you will get completely new instance of MSIE. It will have it's own space for session cookies and, as you have noted, will start a new session when it accesses your site.
If. on the other hand, you open a new window by typing CTRL+N or by using File-> New... from an existing instance's menus, the new window will share the session cookies with the existing instance. Both will take part in the same session.