📜  Struts 2 ActionInvocation教程

📅  最后修改于: 2021-01-11 02:49:46             🧑  作者: Mango

Struts 2 ActionInvocation教程

ActionInvocation表示动作的执行状态。它包含动作和拦截器对象。

动作调用接口

Struts框架提供了ActionInvocation接口来处理ActionInvocation。它提供了许多方法,其中一些方法可用于获取ValueStack,ActionProxy,ActionContext,Result等的实例。

ActionInvocation接口的方法

ActionInvocation接口的常用方法如下:

No. Method Description
1) public ActionContext getInvocationContext() returns the ActionContext object associated with the ActionInvocation.
2) public ActionProxy getProxy() returns the ActionProxy instance holding this ActionInvocation.
3) public ValueStack getStack() returns the instance of ValueStack.
4) public Action getAction() returns the instance of Action associated with this ActionInvocation.
5) public void invoke() invokes the next resource in processing this ActionInvocation.
6) public Result getResult() returns the instance of Result.