The work done by creating ActionContext
* There is a Map<String, Object> in actionContext
* ValueStack stack = dispatcher.getContainer().getInstance(ValueStackFactory.class).createValueStack();
Create ValueStack implementation class by static injection: OgnlValueStack, also It means that when the actionContext is created, the value stack is created
* The map stack in the ValueStack is the same as the Map in the
ActionContext * Through ActionContext.setContext(ctx); put the actionContext into the ThreadLocal, so that the data is Safe
ActionProxy creation
* ActionProxy proxy = config.getContainer().getInstance(ActionProxyFactory.class).createActionProxy(
namespace, name, method, extraContext, true, false);
*
ActionInvocation inv = new DefaultActionInvocation(extraContext, true);
Created DefaultActionInvocation
When creating ActionProxy, the init method of invocation has already been executed
what the invocation init method does:
Action creation and creation of all interceptors
execute the inovke method in invocation
* execute all interceptors
* execute The currently requested action
* executes the result set
struts2 process
Guess you like
Origin http://10.200.1.11:23101/article/api/json?id=326810547&siteId=291194637
Recommended
Ranking