The ActionErrors Object
When a user submits a login page with either the user name or password
missing, the page is redisplayed with error messages included at the top of
the form.
- This happens because the validate() method in the
loginForm bean returns an ActionErrors object
- An ActionErrors object is a collection of ActionError
objects
- When validate() is entered,
an empty collection is created
- If a login field is missing,
an ActionError object is created and added to the collection