Google News
logo
Java Struts - Interview Questions
What is the use of Validate () and Reset () methods in Struts?
Validate () method is used to validate the properties after they have been populated and it is called before the Form Bean is passed to the action. It returns a collection of action errors.
 
Syntax : Public ActionErrors Validate (ActionMapping mapping, HttpServletRequest request)
 
Reset () method is used to reset all the ActionForm’s data before the new values are being set. It is called by the struts framework with each request that uses a defined action form.
 
Syntax : public void reset ((ActionMapping mapping, HttpServletRequest request)
Advertisement