Describe Validate() and reset() methods.

Answer

Validate() Method: this method is used to validate the properties after they are explored by the application.

  • Validate method is Called before FormBean is handed to Action.
  • This method returns a collection of ActionError.
  • Syntax of Validate() Method:
    public ActionErrors validate(ActionMapping mapping,HttpServletRequest request)

Reset() Method: this method is called by the Struts Framework with each request that uses the defined ActionForm.

  • Used to reset all the data from the ActionForm
  • Syntax of Reset() Method:
    public void reset() {}

All struts2 Questions

Ask your interview questions on struts2

Write Your comment or Questions if you want the answers on struts2 from struts2 Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---