| Article: |
Handling Multiple Submits | |
| Subject: | Poor Solution at Best | |
| Date: | 2003-04-17 07:49:54 | |
| From: | anonymous2 | |
|
This solution may have been considered adequate in a trivial solutions sandbox back in the days of Servlet 2.0 - but, now-a-days there are much more robust, and much more adequate solutions. Using the pre-existence of a session as a handler is completely useless in a modern application (especially a model 2 application). What if this form submission needs information from previous form submissions? (A multiple page process).
|
||
Showing messages 1 through 2 of 2.
-
Poor Solution at Best
2003-04-24 00:08:03 anonymous2 [View]
-
Poor Solution at Best
2003-04-27 14:51:41 anonymous2 [View]
the easiest is using Jakarta Struts.. checkout the following methods in the javadoc:
org.apache.struts.action.Action.generateToken()
org.apache.struts.action.Action.resetToken()
org.apache.struts.action.Action.isTokenValid()
this will be the answer to your prayers...



It was mentioned that support is inbuilt in strtus too. However if someone presses back and resubmits : then how can I prevent them from Resubmit.
Someone asked me this even in an interview :) I did not have a good solution. Someone Please suggest.