The reset() and validate() Methods
LoginForm also overrides the reset() and
validate() methods.
- reset() is called by Struts whenever the
login page is requested
- In this case, reset() simply blanks out the input text fields
- The
validate() method is called when a user submits the page
- should simply check that the form has been filled out
properly (neither field is blank)
- should not do any user authentication (should
be part of business model, not the controller)
- makes use of an
ActionErrors object and a message resource bundle