Just define multiple hosts. Cookies are stored per host; host is the
mid-part of the uri.
So if you have two virtual servers like:
xxx.mydomain.net and zzz.mydomain.net the jsessionid wouldn't be shared. 

So in your case, if you have control over the dns server, you could define
1000 hosts for your application 
(all pointing to same ip), and let the root application select one randomly.
For example: 
You define www0001-www9999
Client connects to www.yourapplicationdomain.net
Your root application (webapps/ROOT/index.jsp) does something like:
(Random rnd is defined staticaly)
String myName = "www"+rnd.nexTInt(10000);
response.sendRedirect(myname+".yourapplicationdomain.net/<your_app_entry_poi
nt>"); // not exact syntax

This would be a workaround to your problem, but to be true, i'd rather try
to refactor my application to be a bit less
stateful, and support multiple browser windows if this is a requirement.

regards

Leon

P.S. 

> Also, what if MSIE will add tabs? Some MSIE extensions 
> already allow to have several tabs. What if a user turned off 
> the "Start a new process" setting in MSIE? What about Opera?

Actually the default MSIE setting is running all windows in same process, so
you need to 
setup IE explicitely to run windows in separate processes. Even you do it,
it only applies to
windows created by starting new explorer session, but not for ctrl-n created
windows.

P.P.S. 

What exactly you store in the session?


> -----Ursprüngliche Nachricht-----
> Von: Michael Jouravlev [mailto:[EMAIL PROTECTED] 
> Gesendet: Donnerstag, 21. April 2005 19:24
> An: Struts Users Mailing List; [EMAIL PROTECTED]
> Betreff: Re: Can you make Tomcat 5 create multiple JSESSIONID 
> cookies in Firefox?
> 
> I guess you cannot do this. I don't think that it is possible 
> to start new Firefox window in separate process. And cookies 
> are bound to the process. This is the implementation detail, 
> but I guess all browser vendors bind cookies to the process. 
> This is not Tomcat issue.
> 
> Anyway, relying on session ID only is not robust in 
> multi-window environment. Even if Firefox could be started as 
> new process, it would not help if a user simply opened new 
> tab, not a new window.
> 
> Also, what if MSIE will add tabs? Some MSIE extensions 
> already allow to have several tabs. What if a user turned off 
> the "Start a new process" setting in MSIE? What about Opera?
> 
> You might need to create your own key besides session cookie, I guess.
> 
> Michael.
> 
> On 4/21/05, Dick Starr <[EMAIL PROTECTED]> wrote:
> > I am using Tomcat 5.0.18 and Firefox 1.0.3. A client opens several 
> > windows accessing the same web application.
> > 
> > When using the IE 6 browser, Tomcat 5 creates one JSESSIONID cookie 
> > for each window. Every thing works fine.
> > 
> > When using the Firefox browser, Tomcat 5 creates only one 
> JSESSIONID 
> > cookie for all the client windows. My application stores 
> data in the 
> > session context, and fails because each window is sharing the same 
> > session variables.
> > 
> > I want to allow cookies in the browser, but can't find a 
> way to make 
> > my application work with Firefox. I can upgrade Tomcat, if 
> that would 
> > solve the problem.
> > 
> > Thanks in advance.
> > 
> > Dick Starr
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to