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 does validation interceptor?
In struts, how can we access java beans and their properties?
What is the use of namespace in action mapping in Struts2?
what is tiles in struts?
What is the purpose of '@customvalidator'?
Which tag is used to declare constants in struts xml?
What are the steps required for setting up validator framework in struts?
while working struts in intellij 7.0error unable to initialize tld location cache: zip file is closed is displayed anybdy can answer me immdialy .ungert
drawback of Validation Framework where and how to write the connection pool object in the programe how to debug the programe and application in struts without using eclips
Which interceptor is responsible for mapping request parameters to action class Java Bean properties?
Explain about how requests from the client are sent?
What is jakarta struts framework?