I've read the similar topic below, but my problem is slightly different in that there is no intervening servlet. When I use window.open() to open a new window, the session object i had previously is lost. How can I retain the session in the new window?
What are you opening your new window from? Is it a JSP? Or an HTML page? If it is a JSP then just use the encodeURL method to generate the new window URL. If it is an HTML page then how is it generated? If it just a static file then I dont think you can get the session info to it, you'll have to change the page to be generated by a JSP or servlet. If it is already generated by a servlet you can jst use the encodeURL method to create the URL and place it in the generated page. does that help? If not post some code or another explaination.
I have the same problem with window.open() but what's even worse: i don't give any url because i load the new window's contents with document.write() methods. (Obviously, i have no chance to use encodeURL in this case ) What is the solution? (some msdn pages said that this is an IE bug and should be worked around by turning off the "launch ie windows in a separate process" checkbox... i wonder if it's true, but is this REALLY the only way?... ask my users kindly to switch it off and think of Gates instead of me? )
chanoch<p><a href="http://www.amazon.com/exec/obidos/ASIN/1861007736/" target="_blank" rel="nofollow">Author of Professional Apache Tomcat</a></p>
I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
Joined: Jul 14, 2002
Originally posted by chanoch wiggers: why cant you use encode URL? (...) like var think = "<%=encodeURL("/")%>"; or something
Well, either you don't understand the problem or i don't see the solution... I don't believe that Explorer would act different just because of using a string-to-string function in my code. However, i walked around the problem in the past few hours and i found that if i open a simple window when my program starts (and ask user not to close it, for a whatever reason), this solves the Whole Big Explorer 6 Problem (aka WBE6P from now on ) So this is a quick patch until ms comes out with the bugfix. Basically, the cookie problem happens when you close the LAST window that has been window.open()-ed by your site. If one of them stays, your session parameters stay too. There are a few cases when Explorer doesn't lose the cookie but these are more like accidents. Normally it does. This is a documented bug, see http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q315713 for details. BUT DON'T THINK IT'S OKAY if you download the browseui.dll mentioned on this page - i got that 1024512 bytes long version and it does NOT solve the problem. What you really can do is 2 easy-to-follow steps: sit and wait
(any other patch or solution or workaround or whatever would be still appreciated! thx)
Just had the same behaviour (IE 5.5), this solution was implemented in Websphere 4.0.3 but should work with the others too... Turn on URL Rewriting, use response.encodeURL("") to add the session ID to the URL. Does this help, or am I just confusing things at this stage?
We have had the same problems with our popups losing the cookie from the parent window, and I have been given the task to find a solution. I'm looking for a solution, (eg. download this patch, upgrade to new service pack) not a work around. Has anyone successfully fixed this, short of reinstalling your OS? I have tried to update my browser service packs, but I still get the same behavior in the popups. I have the newest version of IE6 and it still happens. We also have an exe that we use to call a browser in our own window, and the session lost on the popup ALWAYS happens on all of our machines which leads us to believe it is a Microsoft OS problem rather than an IE problem. Any help with this would be appreciated.