1. Execute () method of action class:
Public actionforward execute (actionmapping mapping,
Actionform form,
Httpservletrequest request,
Httpservletresponse response)
Throws ioexception, servletexception;
2. Parameters and return values of the execute () method of the action class:
-The execute () method contains the following parameters:
-Actionmapping: contains the configuration information of this action, which corresponds to the <action> element in the strutsconfig. xml file.
-Actionform: contains the user's form data. When the Struts Framework calls
When the execute () method is used, the data in actionform has passed form verification.
-Httpservletrequest: current HTTP request object
-Httpservletresponse: current HTTP Response object
-The execute () method of the action class returns the actionforward object, which contains the request forwarding path information.
3. built-in struts action class:
-Org. Apache. Struts. Actions. forwardaction
-Org. Apache. Struts. Actions. includeaction
-Org. Apache. Struts. Actions. dispatchaction
-Org. Apache. Struts. Actions. lookupdispatchaction
-Org. Apache. Struts. Actions. switchaction.
4. The model represents the application's business data and business logic. Struts, as a Web framework, does not provide ready-made services for creating model components.
Framework. However, Struts allows other model frameworks to process application business logic. For example: EJB, JDO, JavaBean,
Orm, spring, etc.
Lesson 5 struts controller [continued] execute () method of action class