You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by j alex <st...@gmail.com> on 2007/08/15 13:57:07 UTC

S2 : Overriding interceptor class names in struts.xml

Hi,

Is there a way we can override the implementation of certain
interceptors from the default stack, without copying over all the
definitions to struts.xml ?

ex : i want to change the behavior of workflow interceptor in the way
it handles errors and routes to input page. I defined :

 <interceptors>
            <interceptor name="workflow" class="com.mypackage.MyWorkflowInterce
ptor"/>
 </interceptors>

within <package name="hello-default" extends="struts-default">

in struts.xml, but seems it still picks up the default one.

I know we can override the params of each interceptor , but can we do
the same with implementation class itself?

Thanks,
Joseph

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: S2 : Overriding interceptor class names in struts.xml

Posted by Nils-Helge Garli <ni...@gmail.com>.
Unfortunately, you have to re-define the stack.

Nils-H

On 8/15/07, j alex <st...@gmail.com> wrote:
> Hi,
>
> Is there a way we can override the implementation of certain
> interceptors from the default stack, without copying over all the
> definitions to struts.xml ?
>
> ex : i want to change the behavior of workflow interceptor in the way
> it handles errors and routes to input page. I defined :
>
>  <interceptors>
>             <interceptor name="workflow" class="com.mypackage.MyWorkflowInterce
> ptor"/>
>  </interceptors>
>
> within <package name="hello-default" extends="struts-default">
>
> in struts.xml, but seems it still picks up the default one.
>
> I know we can override the params of each interceptor , but can we do
> the same with implementation class itself?
>
> Thanks,
> Joseph
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org