FileDocCategorySizeDatePackage
StrutsActionProxy.javaAPI DocExample2175Mon Jul 23 13:26:52 BST 2007org.apache.struts2.impl

StrutsActionProxy

public class StrutsActionProxy extends com.opensymphony.xwork2.DefaultActionProxy

Fields Summary
private static final long
serialVersionUID
Constructors Summary
public StrutsActionProxy(String namespace, String actionName, Map extraContext, boolean executeResult, boolean cleanupContext)


          
                                   
        super(namespace, actionName, extraContext, executeResult, cleanupContext);
    
Methods Summary
public java.lang.Stringexecute()

        ActionContext previous = ActionContext.getContext();
        ActionContext.setContext(invocation.getInvocationContext());
        try {
// This is for the new API:
//            return RequestContextImpl.callInContext(invocation, new Callable<String>() {
//                public String call() throws Exception {
//                    return invocation.invoke();
//                }
//            });
            
            return invocation.invoke();
        } finally {
            if (cleanupContext)
                ActionContext.setContext(previous);
        }