Action Classes
Here is the
LoginAction class that is invoked when a user tries to login.
- LoginAction extends Action, which is part of the Struts
framework.
- The execute() method must be overridden
- Login credentials from the JSP are passed in via the form
argument to execute()
- Credentials are passed to a SecurityService object
- If credentials are good, a UserView object is created - a simple
JavaBean used to display customer-specific content in the application
- The UserView bean is stored in the user's session object
- execute() must return a forwarding action, which in this case is
found in the mapping specified in struts-config.xml