码迷,mamicode.com
首页 > 其他好文 > 详细

重读《Struts In Action》

时间:2015-04-13 09:18:15      阅读:136      评论:0      收藏:0      [点我收藏+]

标签:

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, HTTP has two 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 that holds all of the data associated with the processing of a request.

The ActionContext contains all of the data that makes up the context in which an action occurs. This includes the ValueStack but also includes stuff the framework itself will use internally, such as the request, session, and application maps from the Servlet API.

 

OGNL is a powerful expression language (and more) that is 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 ValueStack, yourself. Primarily, you’ll use OGNL to do this.

 

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

技术分享

 

重读《Struts In Action》

标签:

原文地址:http://www.cnblogs.com/IcanFixIt/p/4421258.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!