In-depth introduction to struts2 (1) --- Xwork

Source: Internet
Author: User

1. Basic Knowledge

Struts2 was developed based on the webwrok technology and adopts the interceptor mechanism to process user requests. Webwork is a powerful web-based MVC framework built on the command mode framework of xwork. All in all, both struts2 and webwork are at the bottom layer of xwork. If you have read the struts source code, you will surely find that many xwork2 types are imported into struts. Here is an introduction to xwork:

For details about webwork, refer to Baidu Encyclopedia:

Http://baike.baidu.com/view/25660.htm

1.1 Xwork1.1.1 Xwork Overview

XWork is implemented in a standard Command mode and is completely isolated from the web layer. Xwork provides many core functions: interceptor, form attribute verification during runtime, type conversion, and powerful expression language (OGNL-the Object Graph NavigationLanguage ), ioC (Inversion of Control Inversion Control) containers.

The purpose is to create a generalized, reusable, and scalable command mode framework, rather than a framework used in a specific field. [1]

1.1.2 features

1. Flexible And customizable configuration based on a simple interface;

2. The core command mode framework can be customized and extended to adapt to any request/response environment;

3. The entire framework is constructed through type conversion and OGNL action attribute verification;

4. It contains a powerful verification framework based on runtime Attribute and verification interceptor.

1.1.3 relationship with webwork

WebWork2 is built on XWork and is based on XWork. The XWork command mode framework and interceptor framework provide a command mode framework that supports Web functions and can quickly build Web applications.

When processing a request, the interaction between Webwork and Xwork is as follows:


Figure 1.1.3 interaction between webwork and xwork


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.