Describe validate() and reset() methods ?

validate() : ActionForm class provides a validate() method hook that can be overridden by subclasses to perform validations on incoming form data.The validate() method hook gets called after a Form Bean has been populated with incoming form data. Following is the method signature for the validate() method

public ActionErrors validate(ActionMapping mapping,HttpServletRequest request)

validate() method has return type ActionErrors

reset(): ActionForm class has a reset() method that subclasses can override. The method is a hook that gets called before FormBean is populated with request data from an HTML form. Using this reset() method, all the form fields will be reset.i.e..Unchecking the check boxes, making the text fileds empty..etc

public void reset() {}

Advertisements

3 Responses

  1. […] be reset.i.e..Unchecking the check boxes, making the text fileds empty..etc public void reset() {} Add comment March 29th, […]

  2. how to display the error messages in the jsp page

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: