How to carryout the validations in struts if the validator
frame work cant handle the validation
Answers were Sorted based on User's Feedback
Answer / srilatha ghanta
Struts supports two types of validation
1)"pro grammatical validations" ,performed using
validate()method in form bean.
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
}
validate method return type is ActionErrors ,it holds set of
ActionError objects.
2)"declarative validations" ,handled by struts frame work only.
Struts provides a XML file validator-rules.xml which
contains standard validation methods
so this fie is configured into our application like this in
struts-config.xml file using <plug-in >tag.
we are having the responsibility inform to framework which
validations only u are using in Ur applications.that
particular keys can be defined in validation.xml file.
this file also configured in struts-config.xml
<plug-in
className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames"
value="/org/apache/struts/validator/validator-rules.xml,
/WEB-INF/validation.xml" />
</plug-in>
| Is This Answer Correct ? | 6 Yes | 1 No |
There are two types of validations in Struts.
1.by using validator method in form bean.
2.by using validator.XML file in the struts. that
vlalidators are declared in validator.XML.
The validator frame work handle the validation. he
validation are declaring in validator.xml.
| Is This Answer Correct ? | 2 Yes | 1 No |
What do you know about validation plugin ?
What is struts2 framework?
What is Portlet???? when,where and why we use it ??
3 Answers Infotech, Rebaca, Wipro,
What are the cons of struts 2?
What is used to display the intermediate result in an interceptor?
why we are using vo,dao and dto design patterns in struts framework
How duplicate form submission can be controlled in struts?
Explain how to work with error tags?
What are the steps involved in creating a strut application?
what are the type of forward class in Struts?
What is the purpose of @createifnull annotation annotation?
What are different Struts2 tags? How can we use them?