Lesson 5 struts controller [continued] execute () method of action class

Source: Internet
Author: User
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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.