Struts 2 SYSTEM INTRODUCTION

Source: Internet
Author: User

The system of Struts 2 differs greatly from that of Struts 1 because Struts2 uses the design core of WebWork, rather than Struts1. Struts2 uses a large number of interceptors to process user requests, allowing the user's business logic controller to be separated from the Servlet API.

The general process of Struts 2 framework is as follows.

(1) The browser sends requests, such as/mypage. action,/reports/myreporttables.

(2) The core controller FilterDispatcher decides to call the appropriate Action based on the request.

(3) the interceptor chain of Struts 2 automatically applies common functions to requests, such as workflow, validation, and file upload.

(4) The execute method of the callback Action. The execute method first obtains the user request parameters and then performs a database operation to save the data to the database or retrieve information from the database. In fact, because Action is only a controller, it calls the business logic component to process user requests.

(5) The result information of Action's execute method will be output to the browser, which can be HTML pages, images, PDF documents, or other documents. In this case, many view technologies are supported, including JSP and template technologies such as Velocity and FreeMarker.

 

Reproduced in: http://tech.hexun.com/2009-05-27/118118544.html

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.