Yep!

The result has already been rendered by the time `invoke()` returns. [1]

Dave

[1] http://struts.apache.org/2.x/docs/writing-interceptors.html

2011/11/24 Torben Hedstrøm <torbenhedst...@gmail.com>

> Hi...
>
> How do I control the result from within my Interceptors ?.
>
> -I have defined :
>
>
>        <interceptors>
>            <interceptor name="exceptionhandler"
> class="org.husejerforeningen.interceptor.ExceptionInterceptor"/>
>            <interceptor-stack name="hf-default">
>              <interceptor-ref name="exceptionhandler" />
>              <interceptor-ref name="params" />
>              <interceptor-ref name="servletConfig"/>
>            </interceptor-stack>
>        </interceptors>
>        <default-interceptor-ref name="hf-default"/>
>
>        <global-results>
>         <result name="error">/err.jsp</result>
>        </global-results>
>
>
>
> So to test things...
>
>
> public class ExceptionInterceptor implements Interceptor {
> ...
>    public String intercept(ActionInvocation ai) throws Exception {
>    ...
>        ai.invoke();
>        return "error";
>    }
> ...
> }
>
>
> But my application does not go to the result defined by the "error"
> outcome. Am I missing the point here ??.
>
>
> --
> Med venlig hilsen / Kind regards
>
> Torben Hedstrøm
>

Reply via email to