Loading
Struts multiple Form submissions

Java Quick Notes

Refresh Your Java - Before Java Interview

We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....


Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet

Go to SiteMap

Q)  How you could avoid multiple Form submissions (Posts or Clicks) in Struts ?


Ans)

Mutli-click prevention by using struts tokens- Prevent Duplicate Submission

saveToken() - generate the token key and save to request/session attribute.
isTokenValid() - validate submitted token key against the 1 store in request/session.
resetToken() - reset the token key
Follow the steps to setup Mutli-click prevention using struts tokens.

Step 1. Action Class where saveToken() before JSP Page.
Step 2. Store Token key as a hidden field: ( empform.jsp)
Step 3. Check Token is Valid ?



Back to top

------------------------- We hope you got necessary Info On -----------------------------------------

Struts multiple Form submissions


Struts multiple Form submissions

-------------------------------------------------------------------------------------------------------



Face Book
Request for a Mock Interview/Training

Get a PDF

Face Book
Same look (Read) on any device, this is Ads free