Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to carryout the validations in struts if the validator
frame work cant handle the validation

Answers were Sorted based on User's Feedback



How to carryout the validations in struts if the validator frame work cant handle the validation..

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

How to carryout the validations in struts if the validator frame work cant handle the validation..

Answer / sitaram

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

Post New Answer

More Struts Interview Questions

what is the difference between ServletContext and ServletConfig?

4 Answers  


Hi i am murali.i need a excellent answer for the question Tell me about project and project flow ? i mean it is use full to any project,it is on STRUTS

2 Answers  


How can link tag’s action attribute be used?

0 Answers  


What are the steps involved in creating a strut application?

0 Answers  


Can we write Structs application without using Action Class directly or indirectly(extends Action class)

5 Answers  


Define struts?

0 Answers  


What is actionmapping?

0 Answers  


What is filter dispatcher in struts?

0 Answers  


How can you create your custom interceptor in struts 2?

0 Answers  


what is ForwardAction and IncludeAction in struts?

3 Answers   Mind Tree, Satyam,


diffrence between dispatch action and lookupdispatch action write simple web appliction (insert records in database)

8 Answers   Athena Health Care, Symphony, TCS,


Why we use struts over servlets?

0 Answers  


Categories