THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||
---|---|---|---|---|
| ||||
<action name="LazyFoo" class="com.opensymphony.xwork2.SimpleAction"> <result name="success">result.jsp</result> <interceptor-ref name="lazy"> <param name="foo">${bar}</param> </interceptor-ref> </action> |
Code Block | ||||
---|---|---|---|---|
| ||||
public class MockLazyInterceptor extends AbstractInterceptor implements WithLazyParams {
private String foo = "";
public void setFoo(String foo) {
this.foo = foo;
}
public String intercept(ActionInvocation invocation) throws Exception {
....
return invocation.invoke();
}
} |
Please be aware that order of interceptors can matter when want to access parameters passed via request as those parameters are set by Parameters Interceptor.
...