Telling Struts How to Validate Input
How does Struts know that when a validation error occurs the login page
should be redisplayed?
Recall the
login action element
that links the basketball login page with a form bean.
- The validate attribute is set to true
- So if the form bean's
validate() method returns any errors, Struts will forward control back
to the resource indicated by the input attribute
- in this case, the login page