I\'m implementing some stuff in my Struts-based application using interceptors, and I\'m getting confused about how their lifecycle works. According to the Struts docs ("In
There's no two calls to the interceptor:
public class MyInterceptor implements Interceptor {
public String intercept(ActionInvocation invocation) {
/*
This is before Action.execute(),
and before all interceptors down the stack
*/
String code = invocation.invoke();
/*
This is after Action.execute(),
the result rendering and all
interceptors down the stack,
but before the interceptors
higher up in the stack.
*/
return code;
}
}
(Note that the "two calls to intercept" I was witnessing in the debugger were a result of a less obvious redirect that I failed to notice. This confused me a lot.)