Reread "Struts in Action"

Source: Internet
Author: User

Figure 1.1. The Java Servlet API exposes the HTTP client/server protocol to the Java platform. Struts 2 is built on top of that.

For Web applications, the HTTP has both hurdles to get over. It ' s stateless, and it's text based.

Don ' t reinvent the wheel

Filterdispatcher:early version

Figure 1.4. Struts 2 request processing uses interceptors that fire before and after the action and result.

The Valuestack is a storage area, holds all of the data associated with the processing of a request.

The actioncontext contains all of the data is makes up the context in which an action occurs. This includes the Valuestack but also includes stuff the framework itself would use internally, such as the request, Sessio N, and application maps from the Servlet API.

OGNL is a powerful expression language (and more) that's used to reference and manipulate properties on the Valuestack.

Typically, it is considered bad form to obtain the contents of the actioncontext yourself. The framework provides many elegant ways to interact with that data without actually touching the actioncontext, or the Va Luestack, yourself. Primarily, you'll use OGNL.

Figure 2.6. Anatomy of a url:mapping a URL namespace to a Struts 2 action namespace

Reread "Struts in Action"

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.