aspose file tools*
The moose likes Struts and the fly likes validation in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "validation in struts" Watch "validation in struts" New topic
Author

validation in struts

hari krishnan
Greenhorn

Joined: Jul 27, 2007
Posts: 4
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

Joined: Jun 27, 2007
Posts: 41
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

Joined: Apr 26, 2005
Posts: 25
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.


IBM Certified SOA Associate
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: validation in struts