Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

validation in struts

 
hari krishnan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends


can anyone explain the difference between using ActionForm validate() method and validation.xml,when these two methods are in demand.



Thank you
 
Sahid Khan
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

validation.xml comes with struts validator framework. It gives you certain set of validation rules, which you can use conveniently from xml files. But with ActionForm validate method you need to write your validation rules programmatically. So I think validator framework makes it more convenient for you.
 
purushottaman dwarkanathan
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
validation.xml will take care of the validation for common fields that can appear in a form and also based on the data types that is involved.

Normally since we are going for DynaActionForms these days, we do not need any implementation of the validate method.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic