Home » Struts 2 ActionInvocation Tutorial

Struts 2 ActionInvocation Tutorial

by Online Tutorials Library

Struts 2 ActionInvocation Tutorial

The ActionInvocation represents the execution state of an action. It holds the action and interceptors objects.

ActionInvocation Interface

The struts framework provides ActionInvocation interface to deal with ActionInvocation. It provides many methods, some of them can be used to get the instance of ValueStack, ActionProxy, ActionContext, Result etc.

Methods of ActionInvocation Interface

The commonly used methods of ActionInvocation interface are as follows:

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.

You may also like