And to add to the list of woes: Where you have multiple browser windows submitting requests in the same session - one example being where you want to have the main window show a table of items from which you may edit or view details of individual items in new windows.
Session scoped actionforms encounter a problem here, in that for a specific action/form mapping you have but one key under which the actionform is stored in the session, making it distinctly 'troublesome' to implement multiple window detailviews - each window will end up trying to share the same actionform. (nasty). (Of course the best way round this is to use request scoped forms, but depending on what you need to do its (usually but) not always practical). (We needed to keep our forms session scoped for various reasons but we got around this another way that involved generating a unique id (appended to request urls) for an 'operation context' and storing the form in this 'context' in the session. It involves doing fun things with the request processor and isnt really for the faint hearted...) -----Original Message----- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] Sent: Tuesday, 28 October 2003 03:57 To: Struts Users Mailing List Subject: Re: Session-scoped form and synchronization... Peter Abbot wrote: >Generally if you are using a browser based interface to execute a >servlet requests (except if using frames) the user can only send one >request at a time. So if you are using a action with a session form and >another action wants to use that form means that the user doesn't want >the result of the previous request that might still be using the form. > > > Unfortunately, having frames is *not* the only scenario where you have to worry about multiple simultaneous requests. Two simple additional ones: * Your app contains <img> tags that point back into your app (dynamically generated images, for example). * User starts a long request, presses stop, starts a second request. >Pete > > > Craig >-----Original Message----- >From: Manish Singla [mailto:[EMAIL PROTECTED] >Sent: Tuesday, 28 October 2003 8:25 a.m. >To: Struts Users Mailing List >Subject: Re: Session-scoped form and synchronization... > > >hmmm..... may be this not an bug...as struts ActionServlet extends Java > >Servlets ..... >And Java Servlet is not not thread safe.... > >FYI: same goes for application attributes.. > > > >Bob Lee wrote: > > >>I assume this is a bug then, because there's no way for me to do this. >>It has to be done within Struts. >> >>Bob >> >>Kris Schneider wrote: >> >> >> >>>Nope, don't think so. >>> >>>Quoting Bob Lee <[EMAIL PROTECTED]>: >>> >>> >>> >>> >>> >>>>Does Struts synchronize on session-scoped forms? For example, can I >>>>assume that Stuts won't modify the fields on a session-scoped form >>>> >>>> >in > > >>>>response to one request while an action is still using it? >>>> >>>>Thanks, >>>>Bob >>>> >>>> >>>> >>> >>> >>> >>> >> >>--------------------------------------------------------------------- >>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]

