What is the use of ActionForm class, Describe it's Life Cycle

ActionForm class is used to capture user-input data from an HTML form and transfer it to the Action Class. ActionForm plays the role of Transport Vehicle between the presentation Tire & Business Tier.

Life Cycle :
1. Request received by Controller
2. Create or recycle ActionForm
3. Call reset()
4. store ActionForm in proper scope
5. populate ActionForm from Request
6. Validate the ActionForm
7. If errors found then forward back to input attribute page(configured in Action mapping in struts-config.xml) with ActionForm in scope. If no errors found then call execute() with the ActionForm.

Showing Answers 1 - 1 of 1 Answers

u.vellaisamy

  • May 21st, 2006
 

An ActionForm is a java bean that extends org.apache.struts.action.ActionForm, ActionForm maintain the session state of web application.

All data submitted by the user are sent corresponding ActionForm 

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions