This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes Validations in Form/Action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Validations in Form/Action" Watch "Validations in Form/Action" New topic
Author

Validations in Form/Action

M Mehta
Ranch Hand

Joined: Aug 03, 2006
Posts: 92
In struts we can do the front end validations in the form by implementing the validate method of ValidatorForm, or the same validations can be put in the Action by creating new ActionMessages and populating the same with error messages to be shown.

can anyone tell me which is the preferred way?

Thanks,
M
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Validations in Form/Action