|
From: =?iso-8859-1?Q?<jp....@ti...> - 2003-05-20 16:30:00
|
Hello,=0D=0A=0D=0AStruts allows also to use the token programmatically wi= th setToken(), isTokenValid() and so on. I had implemented such a behavio= r to prevent resubmitting. But the solution asks mandatory the use of a m= anually putted token field in the form as Struts handle this beyond the s= cene. A much more general solution has to be found, but it's an effective= issue we have to care with.=0D=0A=0D=0AJean-Pierre=0D=0A=0D=0A=0D=0A----= ------ Initial Header -----------=0D=0A=0D=0AFrom : springframework-= dev...@li...=0D=0ATo : "j=FCrgen h=F6ll= er [werk3AT]"<jue...@we...>=0D=0ACc : 'spring-dev= -list' <spr...@li...>=0D=0ADate := Tue, 20 May 2003 09:36:40 -0500=0D=0ASubject : [Springframework-develope= r] MVC Forms=0D=0A=0D=0AJuergen,=0D=0A=0D=0AThere is a problem in my vers= ion 1 prototype of the petclinic demo.=0D=0A=0D=0AShould a user change an= owner's info and then use the Back button and =0D=0Atry and resubmit the= form (which has sessionForm=3D=3Dtrue) to make another =0D=0Achange, the= method AbstractFormController.handleRequestInternal will =0D=0Acall user= Object to retrieve the form object from the session. Since the =0D=0Aform= object is no longer there, this results in a ServletException. My =0D=0A= current working version works around this by overriding isFormSubmission = =0D=0Awhich only returns true if the method was POST and it can find the = form =0D=0Aobject. Since I have also overriden formBackingObject to provi= de the =0D=0Aowner info in the first place, this results in a redisplay o= f the form =0D=0Awith the user's latest changes silently ignored. This pr= ocess must seem =0D=0Aunreasonable to users who know nothing about the pr= oblems enterprise =0D=0Aapplication developers face with the browser's Ba= ck button. Maybe I'm =0D=0Agoing about this wrong.=0D=0A=0D=0AThis also b= rings up the issue of when a developer specifically wants to =0D=0Aforbid= resubmission as in a purchase transaction. Struts provides =0D=0Asupport= for a synchronizing token to prevent duplicate submissions using =0D=0At= he <html:form> tag.=0D=0A=0D=0APerhaps we should provide some infrastruct= ure to help developers solve =0D=0Athese problems in a consistent way.=0D= =0A=0D=0AI am also a little bit concerned over the process used in =0D=0A= AbstractFormController and SimpleFormController. Developers may see this = =0D=0Aas too restrictive, especially if they are used to the flexible =0D= =0Aforwarding strategy of Struts.=0D=0A=0D=0AWhat are your thoughts on th= is ?=0D=0A=0D=0AKen=0D=0A =0D=0A=0D=0A=0D=0A=0D=0A-----------------------= --------------------------------=0D=0AThis SF.net email is sponsored by: = ObjectStore.=0D=0AIf flattening out C++ or Java code to make your applica= tion fit in a=0D=0Arelational database is painful, don't do it! Check out= ObjectStore.=0D=0ANow part of Progress Software. http://www.objectstore.= net/sourceforge=0D=0A_______________________________________________=0D=0A= Springframework-developer mailing list=0D=0ASpringframework-developer@lis= ts.sourceforge.net=0D=0Ahttps://lists.sourceforge.net/lists/listinfo/spri= ngframework-developer=0D=0A=0A=0A********** SPECIAL ADSL **********=0AL'A= DSL =E0 partir de 15,95 EUR/mois et le modem ADSL offert ? C'est en excl= usivit=E9 chez Tiscali !=0APour profiter de cette offre, cliquez ici: htt= p://register.tiscali.fr/adsl/=0AOffre soumise =E0 conditions.=0A |