Struts Interview Questions and Answers
Ques 81. What is an ActionForm?
Ans. An 'ActionForm' is a JavaBean that extends org.apache.struts.action.ActionForm.
ActionForm maintains the session state for web application and the ActionForm object is automatically populated on the server side with data entered from a form on the client side.
Ques 82. Describe the details of XML files used in the Validator Framework?Ans. The Validator Framework uses two XML configuration files
1) validator-rules.xml and
The validator-rules.xml defines the standard validation routines.
These are reusable and used in validation.xml to define the form specific validations.
The validation.xml defines the validations applied to a form bean.
Ques 83. How would you display ?validation fail? errors on a JSP page?Ans. Following tag displays all the errors:
Ques 84. How can one enable front-end validation based on the xml in validation.xml?Ans. The
tag allows front-end validation based on the xml in validation.xml.
For example the code:
Most helpful rated by users: