Chapter 10. Exploring the validation framework

This chapter covers

  • Introducing the validation framework
  • Wiring your actions for validation
  • Building a custom validator
  • Adapting the validation framework to your needs

Building on the refinements we saw in the previous chapter, where we added Hibernate-based persistence and Spring resource management to our sample application, this chapter introduces another advanced mechanism of the Struts 2 Framework, the validation framework. We’ve had robust data validation in our Struts 2 Portfolio since chapter 3, where we learned how to implement an action-local form of validation with the Validateable interface’s validate() method. While this method works fine, it has some limitations that eventually become ...

Get Struts 2 in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.