This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
From everything I have read, the validation framework for Struts 2 is considerably different from that of Struts 1. The configuration and syntax looks to be much friendlier. Would you consider it to be a total improvement, or are there areas that could still use improving?
Also, how tough is it to write a custom validator within the new framework? Thanks!
Struts 2 validation is based on the XWork Validation Framework and is as easy to configure as that in Struts 1. I think the validation features are comparable.
Writing a custom validator in Struts 2 is not hard. You just implement the Validator interface that is part of the com.opensymphony.xwork2.validator package or extend a convenience base class. Chapter 7 of my book explains how to write custom validators in detail. There are standard validators that are sufficient in most cases, though.