struts -执行流程

- When a client request is given, a web container will receive request
- Web container loads web.xml and verifies whether the url-patterns are verified or not, if matches web-container transfer the request to FilterDispatcher
- FilterDispatcher hand overs the request to ActionProxy, it is a proxy class which is responsible to apply before and after services to original business logic
- ActionProxy contacts ConfiguraionManager class, to know the suitable Action for the request and the needed services for the request
- ConfigurationManager class loads structs.xml and provides the required information back to ActionProxy
- ActionPorxy delegates the request along with its information to ActionInvocation
- ActionInvocation executes the interceptors added to an Action from 1 – N, after that it will call the business logic implemented from N – 1 in reverse order
- ActionInvocation receives finally result produced by an action aclass
- ActionProxy transfers the result back to FilterDispatcher
- FilterDispatcher selects an appropriate view, basing on the result
- Finally FilterDispatcher uses RequestDispatchers forwarding mechanism and forward a view as a response back to the client
struts -执行流程的更多相关文章
- Struts框架之 执行流程 struts.xml 配置详细
1.执行流程 服务器启动: 1. 加载项目web.xml 2. 创建Struts核心过滤器对象, 执行filter → init() struts-default.xml, 核心功能的初 ...
- Struts2第二篇【开发步骤、执行流程、struts.xml讲解、defalut-struts讲解】
前言 我们现在学习的是Struts2,其实Struts1和Struts2在技术上是没有很大的关联的.Struts2其实基于Web Work框架的,只不过它的推广没有Struts1好,因此就拿着Stru ...
- Struts 2 执行流程 配置信息
Struts 2 执行流程 首先,浏览器访问,经过Filter,Filter从src/struts.xml中寻找命名空间和action的名字,获取action类,从方法中拿到返回值,接着从result ...
- Struts框架的执行流程或原理
Struts2的执行流程如下: 1.浏览器发送请求,经过一系列的过滤器,到达StrutsPreapareAndExecteFilter 2.StrutsPrepareAndExectueFilter通 ...
- Servlet、Struts2、SpringMVC执行流程
Servlet 有以下四个阶段: 1.加载和实例化 Servlet容器负责加载和实例化Servlet. 当Servlet容器启动时,或者在容器检测到需要这个Servlet来响应第一个请求时,创建Ser ...
- struts2 之 【struts2简介,struts2开发步骤,struts2详细配置,struts2执行流程】
入门框架学习避免不了的问题: 1. 什么是框架? 简单的说,框架就是模板,模子,模型.就是一个可重用的半成品. 2. 如何学习框架? 学习框架其实就是学习规则,使用框架就是遵循框架的规则,框架是可变的 ...
- Struts2 执行流程
struts2执行原理(执行流程) 一个请求在Struts2框架中的处理大概分为以下几个步骤: 1 客户端发送请求:(HttpServletRequest)2 这个请求经过一系列的过滤器(Filter ...
- 走进Struts2(一) — Struts2的执行流程及其工作原理
Struts2是一套很优秀的Web应用框架,实现优雅.功能强大.使用简洁.能够说是Struts2是一款很成熟的MVC架构. 在我们学习Struts2时,最好是先学习它的执行流程.核心概念.从中得到启 ...
- s2sh的MVC执行流程和执行原理
=======================执行流程 1. 从页面开始,提交表单或者点击链接会触发一个action 2. action交给struts2处理,读取src目录struts.xml文件, ...
随机推荐
- Gson ------ 实例演习
[本文范围]: 本文并非JSON知识讲解资料,亦非GSON知识讲解资料,而是通过实例让开发人员了解通过Gson如何使Java对象和Json对象进行相互转换. [JSON参考资料]: Json快速入门: ...
- Android模拟器——Genymotion
还在用Android原生模拟器?向你推荐一款全方位把Android原生模拟器秒成渣渣的神器:Genymotion! 需要理由? 性能卓越作为历史上最快的Android模拟器(没有之一),秒级开机关机速 ...
- [C#]网络编程系列专题二:HTTP协议详解
转自:http://www.cnblogs.com/zhili/archive/2012/08/18/2634475.html 我们在用Asp.net技术开发Web应用程序后,当用户在浏览器输入一个网 ...
- (转载)在mysql中,column 'id' in field list is ambiguous
(转载)http://blog.chinaunix.net/uid-20665047-id-3137284.html column 'id' in field list is ambiguous 这个 ...
- HDOJ -- 1015
1.DFS #include<cmath> #include<cstdio> #include<cstdlib> #include<string> #i ...
- rails第一次做项目
最近这几天一直都是在做rails的入门,也就是熟悉rails的增.删.改.查操作,做到rails的入门.这几天的熟悉,只是对于操作的熟悉,对于rails语言的机制还有很多不是很熟悉.昨天接手第一个真正 ...
- Android TextView : “Do not concatenate text displayed with setText”
参考:http://stackoverflow.com/questions/33164886/android-textview-do-not-concatenate-text-displayed-wi ...
- db2 identity列重置,reset/restart
db2中可以对表中的某一个列创建identity列,用于自动填充值,某些情况下(比如删除数据后,需要从最小值开始,并不重复,那可以对标识列进行reset操作) 语法: ALTER TABLE < ...
- jQuery ajax传递特殊字符参数(例如+)
使用jQuery ajax向后台传递参数para=1+1时后台接收到的参数为para=1 1,解决方案是 使用json传递,代码如下. var url = "/test/check" ...
- Datediff函数 助你实现不同进制时间之间的运算
在VB开发环境中实现时间之间的加减运算有很多种方法,前不久自己无意中发现了Datediff函数,它能够比较简单.全面地实现我们比较常用的时间之间的运算,今由自己的研究,搞清了它的一些用法,拿来和大家分 ...