tags:

views:

57

answers:

1

In IE 8 when we open two different browser windows we get the same session unless we use the File -> New Session option.

We have two different applications (j2ee) that use the same domain name. This works perfectly fine in IE 7 when the user opens the two applications in two browser windows. However, in IE 8, what happens is that the browser treats both applications as one - and the session is shared. Now, is there any fix that can be done in the application to ensure that we detect a new window (new session) being opened?

+1  A: 

Usually you'd host the two applications on different paths, right? If that is the case, just limit your session cookie to the path of the application. So, if you have one application on the path /app1 and the other on the path /app2, then the session ID cookie for the first app should look like:

Set-Cookie: JSESSIONID=SOMEVALUE; path=/app1

There should be mechanisms for setting this in your application server. If you give some more details on the application server then we can probably guide to the exact configuration element that needs to be changed.

Guss
We have two different applications using the same domain such as http://domainone.com/app1 and http://domaintwo.com/app2. I use WebSphere application server. The App Server cookies are for a domain such as domainone.com, domaintwo.com etc - i.e. as far as the domain remains same, wont the cookies be the same too ?Creating virtual hosts might be one solution - but i want to make sure that there isnt an app specific fix for this.
Subramanian
I'm not clear on something - you keep saying "the same domain", but you show two different domains: domainone.com and domaintwo.com which are different. So which is it? if the applications are hosted on two different domains then it shouldn't be a problem. If there is a single domain, then you need to use application path in the cookies.
Guss