ActionForm Overviews
Previous | Home | Next |
An ActionForm is a JavaBean .It associated with one or more ActionMappings. ActionForm represents the Form input contaning the request parameters from the view referencing this Action bean. ActionForm bean will have only getter and setter methods but no business logic.
We can used validator Framework with static ActionForms and Dynamic ActionForms.The ActionForm object also offers a standard validation mechanism.We can define a getter and setter method for each field that is present in the form. The field name and property name must match according to the usual JavaBeans conventions.LoginForm.javapackage com.r4r.struts;import org.apache.struts.action.ActionForm; @SuppressWarnings("serial") public class LoginForm extends ActionForm { private String name; private String password; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } }
Previous | Home | Next |