struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wes Wannemacher <>
Subject Re: To use Struts Validation or not?
Date Thu, 19 Feb 2009 06:20:37 GMT
On Thursday 19 February 2009 01:02:16 Rajeshwari Godbole wrote:
> Hi all,
> Our team here has developed a portal using Struts2. Most of the developers
> have used javascript to validate the forms. I know using the Struts
> validation framework is a better way to do this but I think this was
> avoided in the project due to the (perceived) cumbersome setup (xml file,
> rules etc) required as well as a lack of knowledge on why this is better.
> Could you guys help me make a list of why validation should be handled
> using the framework (the pros and cons basically).
> Thanks,
> Rajeshwari

Well, one good reason is the NOSCRIPT add-on for Firefox... If validation is 
central to your app, and it can be so easily by-passed, you could expose 
yourself to some risk (bad data, or *gasp* security holes!!). 

Another is that the ability to add converters and validators to your project 
and the ease of re-use. I mean, coding validation for each form field 



Wes Wannemacher
Author - Struts 2 In Practice 
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message