What are action and action form classes in Struts?Action classes are defined to handle request. Actions exist between Model and view of an application. The struts-config.xml file designates the Action classes that handle requests for various URLs. The struts-config.xml file then decides which JSP page should apply to that situation. Generally Actions do the following:
- Invoke business rules - Return Model objects to the View to display.
Actions have a life cycle similar to servlets. They are like servlets and they're multithreaded.
ActionForm class:
An ActionForm is a JavaBean that extends org.apache.struts.action.ActionForm. ActionForm maintains the session state for web application and the ActionForm object is automatically populated on the server side with data entered from a form on the client side.
|