Discussions

Web tier: servlets, JSP, Web frameworks: Duplicate Session-Ids being generated!

  1. Duplicate Session-Ids being generated! (6 messages)

    Hi. I'm working on a Struts application using WebSphere 5.1 as a server. I have no problems in IE, but when I access my application using Netscape, the same Session Id is generated for any number of Netscape browser windows. I don't know whether the problem lies with Netscape or WebSphere or my application. Please let me know if any of you have faced similar problems. Thanks.

    -Parag
  2. All Netscape/Mozilla windows are part of the same session, so it doesn't matter if you try to open a new "instance" of the browser (because it's still the same instance as the previous) - they will always have the same session cookie when connecting to the server. IE however has separate session cookies for each new instance that you start.

    To summarize, it's the way the browser works and not to do with your app or the app server.
  3. All NS/Mozilla windows running on the same machine with the same user session I should add.
  4. Oh! OK. Thanks.

    -Parag
    (pst. I searched around on netscape.com for official documentation that would corroborate what you said, but I couldn't find anything on that disorganized site. By any chance, do you have any quotable source for your statement?)
  5. Nope, no quotable statment, but if you just have a look at how the processes work you'll see that IE has multiple processes, one for each instance you start. Mozilla/NS however will only have one. As it writes session cookies to the same directory, it can only write/read for one use at a time no matter how many instances you start.

    This I've learned purely from experience, after seeing the same thing as you and doing some testing of my own :-)
  6. Nope, no quotable statment, but if you just have a look at how the processes work you'll see that IE has multiple processes, one for each instance you start. Mozilla/NS however will only have one.
    Yep, this is right, aside that MSIE can be configured to run all IE windows as part of the same process. I don't know do these windows share same cookies or not.
  7. Anyone have a duplicate key exception when they try to do a create into a database with more than one netscape browser window open? I'm guessing this has to do with the shared session problem...