File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes 	Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "	"Struts 2 Design and Programming: A Tutorial" Validation Question " Watch "	"Struts 2 Design and Programming: A Tutorial" Validation Question " New topic
Author

"Struts 2 Design and Programming: A Tutorial" Validation Question

Schevus Osborne
Greenhorn

Joined: Jan 21, 2008
Posts: 7
Hello Budi,

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!

- Schevus
Budi Kurniawan
Author
Ranch Hand

Joined: Apr 30, 2002
Posts: 65
Hello Schevus,

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: "Struts 2 Design and Programming: A Tutorial" Validation Question
 
Similar Threads
Basic of Struts
Struts framework
Stuts Validation
need help on struts features
Apache Struts 2 Web Application Development