- 浏览: 61413 次
- 性别:
- 来自: 广州
-
文章分类
最新评论
代码3.4 业务控制器Bank_Saving_Action
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Bank_Saving_Action演示了对银行存款业务逻辑组件的调用,这里是通过在Action中创建业务逻辑组件实例的方式实现的。在实际开发中,可以使用静态工厂获得业务逻辑组件的实例或者使用IoC容器来管理。Action中不实现任何业务逻辑,只是负责组织调度业务逻辑组件。调用关系如图3.3所示。
图3.3 调用业务逻辑组件
★ 说明 ★
业务控制器Action一般情况下不是直接创建业务逻辑组件实例,而是使用工厂模式或者是从Spring容器中获得业务逻辑组件实例,这样可以提高系统的性能。
3.1.4 视图组件
Struts 1只能支持JSP作为视图资源,而Struts 2的进步之处就是可以使用其他视图技术,如FreeMarker、Velocity等。通过前面的学习和示例,读者会知道Action的返回结果只是一个简单的字符串,也就是一个逻辑上的视图名称,要与实际视图资源对应,必须通过配置文件来实现。
在struts.xml配置文件中,每一个Aciton定义都有name和class属性,同时还要指定result元素。result元素指定了逻辑视图名称和实际视图的对应关系。每个result都有一个type属性,前面介绍的struts.xml中并没有显式指定type值,即使用了默认的type类型:dispatcher,该结果类型支持JSP所谓视图资源。
对于Struts 2的视图技术和result返回类型,后面将详细介绍。总结Strurs 2的框架工作流程,发现与WebWork基本相同,可以参考第1章关于WebWork框架的介绍和流程图(如图1.8所示)。
文章地址: http://blog.csdn.net/ivorytower/archive/2008/04/23/2318939.aspx
发表评论
-
OGNL表达式 用法详解
2012-04-19 11:44 8991表达式通常用来访问页面中的各种变量,进行结果输出. s ... -
struts2.2.3最小jar
2011-07-18 11:32 1768struts2-core-2.2.3.jar :Struts ... -
转: struts2 标签 2
2011-07-05 11:41 1533一、概要:1、JSP标签技术始于JSP1.12、作用: ... -
转:struts2 标签
2011-07-05 11:39 906struts标签的继承 BodyTagSuppor ... -
struts.xml文件属性配置
2011-06-24 16:32 1208开发中发现struts还有co ... -
FilterDispatcher配置
2011-06-24 16:30 1342配置Struts 2的FilterDispatcher类时,可 ... -
struts.xml配置详解
2011-06-24 16:29 757地址:http://www.cnblogs.com/fmric ... -
struts.properties配置详解
2011-06-24 16:14 937在Struts2的核心包中org\apache\strut ... -
转:Struts 2 下载文件(12)下
2011-06-22 18:54 863(2)同时修改配置文件,增加一个input逻辑视图,修 ... -
转:Struts 2 下载文件(12)中
2011-06-22 18:53 74811.3.2 在Action中指定下载资源 前面的 ... -
转:Struts 2 下载文件(12)上
2011-06-22 18:52 106411.3 Struts 2控制文件下载 文件下载相对于 ... -
转: Struts 2多文件上传(11)下
2011-06-22 18:51 832(3)在配置文件中增加如下配置: ... -
转: Struts 2多文件上传(11) 上
2011-06-22 18:50 84511.2 多个文件上传 很多应用都要求在一个界面中可以 ... -
转: struts 2专用表达式(10)下
2011-06-22 18:49 8858.2 Struts 2的OGNL OGN ... -
转: struts 2专用表达式(10)上
2011-06-22 18:47 781OGNL是Object Graphic Navigat ... -
转: 数据校验功能-AJAX输入校验(9)下
2011-06-22 18:45 11937.4.4 建立JSP视图 建立一个reg-aja ... -
转: 数据校验功能-AJAX输入校验(9)中
2011-06-22 18:43 8667.4.2 建立业务控制器 建立一个简单的业务 ... -
转: 数据校验功能-AJAX输入校验(9)上
2011-06-22 18:41 9087.4 AJAX输入校验 Struts 2框架在使用客 ... -
转: Struts 2的拦截器(8)下
2011-06-22 18:39 840(3)在ch5包内建立一个业务控制器Reg,如代码5. ... -
转: Struts 2的拦截器(8)上
2011-06-22 18:39 729拦截器(Interceptor)是Struts 2的核 ...
相关推荐
手指节点俯瞰Fing CLI网络扫描仪工具的简单包装安装首先确保已安装 。 然后通过yarn或npm安装fing-node yarn add fing-node用法 const fing = require ( 'fing-node' )fing . on ( 'scanComplete' , ( hosts ) => { ...
俯瞰迷宫图示说明.pptx,4ae97eceb048191.pptx
站在樱瓣山上俯瞰人间:致小手帕
小学六年级美术下册俯瞰山川PPT学习教案.pptx
【连载三】一篇关于货币的神文:从宇宙哲学俯瞰统一货币秩序变革趋势中的国家大战略选择.doc
俯瞰大数据与组织决策.doc
为量化小白提供俯瞰的视角观察量化投资,了解量化投资的几种投资策略流派,了解量化投资的方法。属于科普类小文。
北京故宫知识和超清图俯瞰图平面图.doc
大周期箱体看盘 俯瞰 一览无余通达信指标公式源码.doc
【俯视地平线,阅读答案】 俯瞰地平线.docx
《航拍中国》观后感10篇俯瞰美丽中国.doc
购房计划恐惧狂欢节大富换房计划供给法国进口和客户更快分管计划供给很快
2、折叠菜单项 3、修改默认视点为北京天安门 4、开启关闭三维在线地形 5、加载离线本地城市建筑素模(北京、上海或省会城市) 6、修改homeButton的默认返回位置 备注:离线素模数据可以私信获取,数量太大,无法发送
MissionPeak 使用html(bootstrap)和css(不使用javascript),在3小时内的Mission Peak徒步远足中体验谦虚,然后俯瞰大自然,俯瞰硅谷
借助遥感卫星的“眼睛”俯瞰全国各地的.小.-汤.-山. A.北京 北京在原***医院院区的西北部绿化区进行选址扩建: 下面我们看一下Planet卫星2020年2月17日拍摄的卫星图像,图像显示院区东北部主体建筑基本已经完工: ...
5 2.1.2 机械结构件的结构要素和设计方法 5 2.1.3 机械结构设计的基本要求 5 2.1.4 机械结构基本设计准则 6 2.2 传动系统设计 6 2.2.1 概述 6 2.2.2 机械传动系统方案设计 7 2.2.3 传动系统的运动和动力计算 7 2.3 ...
捉人者必须用他认为正在隐藏的道具按下【Q】来打断这一过程,逃跑者必须再次隐藏120秒。捉人者使用【Q】捕获躲藏者,躲藏者【1 ~ 9】伪装成不同物品。 火柴人藏猫猫游戏特点: 1.独特的画面视角,让玩家可以俯瞰...
UCSD 异常检测数据集是通过安装在高处的固定相机获取的,可以俯瞰人行道。人行道上的人群密度各不相同,从稀疏到非常拥挤。在正常设置中,视频仅包含行人。异常事件是由于: 人行道中非行人实体的流通 异常的行人...