What is the difference between Form bean and Action form in struts? I thing both have setters,getters,validate,reset methods. Then why Action form is called as model in MVC. Why not Form bean.
Printable View
What is the difference between Form bean and Action form in struts? I thing both have setters,getters,validate,reset methods. Then why Action form is called as model in MVC. Why not Form bean.
Hi,
Form bean is bean class it defines set, get, reset, and validate methods used to handle the form which is sent by the client. controller take responsible to handle the form by using form bean class, It should be subtype of org.apache.struts.action.ActionForm, It is provided by framework which is implemented by form bean class (sub class). it is not called as model in MVC.
thanks
if u have any doubts reply
Logically there is only difference between form bean and Action Form that is form bean that we define extends the Action form. Form beans contains the setter and getter of the bean elements. We define our form bean in the struts config under the <form-beans> tag. Or in other word we can say they are alias of the same thing.