1.

What is validate() and reset() functions?

Answer»

validate() is like a HOOK that can be overridden by different subclasses for performing validations on INCOMING data. This method gets called after a Form BEAN gets populated with incoming data. This method INCLUDES return type ActionErrors.

Syntax is:

public ActionErrors validate(ActionMapping mapping,HttpServletRequest REQUEST)

reset() is a method that gets overridden by subclasses. It is a hook that gets summoned before FormBean gets populated with request data from HTML. Using this method, all form fields get reset.

Syntax is:

public void reset() {}



Discussion

No Comment Found