I cite now a passage of book from Mr. Husted et al., "Struts in action", Manning, copyrighted ...... I hope i not get into trouble, but help is more valuable for me than strict law(despite i bought the book and not going to sell following information).Am i disclaiming in correct way?!?!?!
I will see... CITING BEGIN " Using transactional tokens Duplicate submissions can often be a problem for web applications. Struts supports a strategy to prevent duplication submissions using a synchronizing token. Using synchronizing tokens is automatic for the Struts <html:form> tag. If it sees that tokens are being used, it automatically includes the appropriate hidden field. On the Action side, you can enable transactional tokens by calling saveToken(request); anywhere in the Action's perform or execute method. On the return trip, to have an Action check if a token is still good, call boolean valid = isTokenValid(request); If this method returns false, branch to an error page. If it returns true, call resetToken(request); While participating in a transaction most often occurs with forms, there are also applications for hyperlinks and other assets. Accordingly, the Struts <html:link> and <html:rewrite> tags provide optional support for transactions. To include the appropriate token in the link, set the transaction property to true. A tag like this: <html:link forward="addItem" paramName="row" paramProperty="itemId" paramId="id" transaction="true"/> will then generate a hyperlink like this: <a href="/gavel/do/addItem? id=3017&org.apache.struts.taglib.html.TOKEN=72da1d3fdede66c"> " CITING END -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 30. Jänner 2003 10:23 To: [EMAIL PROTECTED] Subject: / /OREF:CPT36578 Re: Session Time-out: Form population fails Thanks for your reply. Please excuse my ignorance but the transaction token in the form that you mentioned in your mail, what exactly is this ? joerg.maurer@ucp morgen.com To: [EMAIL PROTECTED] cc: 30/01/2003 11:12 Subject: RE: / /OREF:CPTF9D2A Session Time-out: Form population fails AM Please respond to struts-user Not sure/not tested -> hint level : if you can use the TRANSACTION token that is activated in form + having a hidden field in form that sets/get corresponding token, you might be able to test for that -> if new instance of the form is created, token does not match -> route to other command ?!?!? Please report on this! -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 30. Jänner 2003 09:48 To: [EMAIL PROTECTED] Subject: / /OREF:CPTF9D2A Session Time-out: Form population fails Hi all I have a form and Session-scope form bean class that consists of amongst other fields, a variable length list of data. When the form bean is created, the list is length zero and when data has been retrieved and displayed from the backend, the list will contains the corresponding elements. The form works great until the User's Session times out and the User still have the form visible in the browser. When the User submits the form, the original form is gone so a new instance of the form is created (I assume) but the population of the form fails as the number of elements in the list does not match what is currently on the form being submitted. The Users always end up sending an error page. Any suggestions please to solve my messy problem ? thanks very much Aisling --------------------------------------------------------------------- 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]