O'Reilly logo

Struts 2 Design and Programming: A Tutorial by Budi Kurniawan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 15. Preventing Double Submits

Double form submits normally happen by accident or by the user’s not knowing what to do when it is taking a long time to process a form. Some double submits have fatal consequences, some simply unpleasant. For instance, when submitting an online payment in which a credit card will be charged, the user may click the submit button for the second time if the server’s response time is too slow. This may result in his/her credit card being charged twice. Other less critical examples include forms that add a new product and doubly submitting these forms will cause a product to be added twice.

Browsers’ behaviors are different with regard to preventing double submits. Mozilla Firefox will not respond to subsequent ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required