Validator plug-in Recognise and Activate in Struts Application

Question:- When validator plug-in will be recognized and will be activated in Struts application.

Answer:-    When ActionServlet reads Struts-configuration file entries (especially <plug-in> tag) the validator plug-in will recognize. This generally takes place either during server startup or during the deployment of web application, when servlet-container creates & initializes ActionServlet class object.

Validator plug-in will be activated to perform form validations based on validation.xml file entries, when ActionServlet calls validate (-) method of our form bean class related super class. (Validate () method of validatorForm class).

Leave a Reply

Your email address will not be published. Required fields are marked *