文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > IT/计算机 > Struts2.0中ActionInvocation使用
侵权投诉

Struts2.0中ActionInvocation使用

Struts2中ActionInvocation

Interceptor说明

Interceptor的接口定义没有什么特别的地方,除了init和destory方法以外,intercept方法是实现整个拦截器机制的核心方法。而它所依赖的参数

ActionInvocation则是我们之前章节中曾经提到过的著名的Action调度者。 我在这里需要指出的是一个很重要的方法invocation.invoke()。这是

ActionInvocation中的方法,而ActionInvocation是Action调度者,所以这个方法具备以下2层含义(详细看DefaultActionInvocation源代码):

1. 如果拦截器堆栈中还有其他的Interceptor,那么invocation.invoke()将调用堆栈中下一个Interceptor的执行。

2. 如果拦截器堆栈中只有Action了,那么invocation.invoke()将调用Action执行。

3.

DefaultActionInvocation部分源代码:

if (interceptors.hasNext()) {

final InterceptorMapping interceptor = (InterceptorMapping) interceptors.next();

Struts2.0中ActionInvocation使用

UtilTimerStack.profile("interceptor: "+interceptor.getName(),

第1页

你可能喜欢

热门文档

相关文档

  • 北大青鸟struts2.0教程

    在struts1.x版本中存在哪些问题 版本中存在哪些问题 Struts2系列能够给我们带来... 生成一个 用任何拦截器先于调用Action一Acion执行完毕.ActionInvocation负责 用...

  • 02_Struts中Action的使用

    02_Struts中Action的使用_工学_高等教育_教育专区。软件培训机构价值 1万的...Action配置method属性 2、动态方法调用(DMI:Dynamic method invocation) 为Action...

  • struts2详解

    7、ActionInvocation实例使用命名模式来调用,在调用Action的过程前后,涉及到相关拦截器(Interce pter)的调用。 8、一旦Action执行完毕,ActionInvocation负责根据struts....

  • Struts2 中拦截器和Action的调用关系

    Struts2 中拦截器和Action的调用关系_计算机软件及应用_IT/计算机_专业资料。...ActionInvocation类中有一个方法,是invoke(),这个方法很重要,它的作用是首先判断...

  • struts2详解

    8 绑定值到页面(view): Struts 1使用标准JSP机制把对象绑定到页面中来访问。 ...6、ActionProxy创建一个ActionInvocation的实例 7、ActionInvocation调用真正的Action...

  • Struts2开发详解

    方法的 方法的POJO对象可以被当作 对象可以被当作Struts 2的Action对象来使用。 ...的配置文件,找到需要调用的 Action类 6 ActionProxy创建一个ActionInvocation的...

  • Struts2速成教程

    Struts2速成教程_计算机硬件及网络_IT/计算机_专业资料。Struts2速成教程,框架...DynamicMethodInvocation常量值 为false关闭,此值默认为true 在action配置中使用...

  • struts2基本使用方法

    <struts> <constant name="struts.enable.DynamicMethodInvocation" value="false..."struts-default"> <action name="loginAction" class="com.icss.action.Login...

  • struts2.0 学习笔记

    上面的差不多是 Struts 默认显示的两种方式,但是我们常见的显示方式并不是这样...(ActionInvocation a).类似 Filter 接口,核心方法是 interceptor(ActionInvocation a...

  • 使用Struts2快速开发的步骤

    action> </package> 在 struts2 框架中使用包来管理 Action,包的作用和 java...动态方法调用,我们可以通过常量 struts.enable.DynamicMethodInvocation 关闭动态方法...

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email