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文件, ...
随机推荐
- C# WinForm捕获未处理的异常
using System; using System.Collections.Generic; using System.Windows.Forms; using System.IO; namespa ...
- 【转】android获取屏幕宽度和高度
原文网址:http://www.cnblogs.com/howlaa/p/4123186.html 1. WindowManager wm = (WindowManager) getContext() ...
- Android --- px与dip换算
px = (density/160)dpdensity一般为3个常用固定值240/160/120分别对应WVGA/HVGA/QVGA不知道知己做的分辨率对应的density是多少可以点击AVD Man ...
- AppStore IAP 客户端校验代码
-(BOOL)putStringToItunes:(SKPaymentTransaction*)transaction { NSData * iapData = transaction.transac ...
- 编程之美 两个叶子的节点之间 最大距离 变种 leecode
提交地址: https://oj.leetcode.com/problems/binary-tree-maximum-path-sum/ 说一下思路http://www.cnblogs.com/mil ...
- Ubuntu12.04-64bits搭建FFmpeg环境
所有的环境搭建动作请参考FFMpeg官方网站:http://www.ffmpeg.org/index.html 1. 获取源代码: git clone git://source.ffmpeg.org/ ...
- Hadoop--Map/Reduce实现多表链接
MR实现多表连接的原理和单表连接时一样的,甚至比单表连接还要简单. 在map阶段只需要根据文件的名称区分左表还是右表.使用关联的字段作为key2. 在reduce中对values中的值分别存储到一个左 ...
- PHP两个字符串比较(人为出错),两字符串类型和数据表面相等,但strcmp()结果不为0
PHP中,比较两个字符串是否相等用:strcmp(): PHP strcmp() 函数 PHP String 函数 定义和用法 strcmp() 函数比较两个字符串. 该函数返回: 0 - 如果两个字 ...
- HW4.21
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- Power of Cryptography
//只用一行核心代码就可以过的天坑题目............= = 题目: Description Current work in cryptography involves (among othe ...