> Dick Starr [mailto:[EMAIL PROTECTED] wrote: > > I am new to both Struts and web applications and in fact am > writing my very first web application, so I may not > understand how this all works. > In the app it's possible for more than one user to be on the > same PC (e.g. a user needs their supervisor to log on to the > app as a higher security user to do something that the user can't do). > > However, your comment about using request scope makes me > think that I may have misunderstood how ActionForwards work. > I assumed that when you did an ActionForward, that it means a > new request. I think what you are telling me is when you do > an ActionForward it's just a continuation of the original > request - and thus I should be using request scope for my > variables. Right?
Right :-) I mean, you can configure a forward to be execute like a redirect, which would indeed end up in a new request, but the default (if i may say it) way to do it is just a forward, which means nothing else then: getServletConfig().getServletContext().getRequestDispatcher(redirectTarget). forward(request, response); Regards Leon > > Thanks, > > Dick > > -----Original Message----- > From: Leon Rosenberg [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 21, 2005 4:49 PM > To: 'Struts Users Mailing List' > Subject: Re: Can you make Tomcat 5 create multiple JSESSIONID > cookies in Firefox? > > Maybe I'm understanding you wrong, but your multiple windows > are all used by the same user, right? > In this case user name and operation id should be the same > for all 'vsessions' > (virtual sessions between one browser window and the webserver). > The only thing differs between vsessions is your 'validate'. > Why don't you move it in the request scope? > > Regards > Leon > > > -----Ursprüngliche Nachricht----- > > Von: Dick Starr [mailto:[EMAIL PROTECTED] > > Gesendet: Donnerstag, 21. April 2005 23:42 > > An: 'Struts Users Mailing List' > > Betreff: RE: Can you make Tomcat 5 create multiple > JSESSIONID cookies > > in Firefox? > > > > Thanks for the responses. > > > > Currently I store the following in session: user name > (display it in > > my tiles header and use it in my tile definition with > <c:if's to not > > display toolbar menus when no user has logged in), operator > id (to get > > the user's id from within crud maintenance classes as part of > > informational or error messages), and validate (set in the > maintenance > > classes to control validation in my base DynaValidatorForm). > > > > Sincerely, > > > > Dick > > > > -----Original Message----- > > From: Leon Rosenberg [mailto:[EMAIL PROTECTED] > > Sent: Thursday, April 21, 2005 2:26 PM > > To: 'Struts Users Mailing List' > > Subject: AW: Can you make Tomcat 5 create multiple > JSESSIONID cookies > > in Firefox? > > > > 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] > > > > > > > > > --------------------------------------------------------------------- > > 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] > > > > --------------------------------------------------------------------- > 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]