You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Norbert Harrer <nh...@gmx.at> on 2017/07/29 08:26:32 UTC
Setting interceptor param on package level
Hi.
A question just out of curiosity. Is it possible to set an interceptor
parameter on the package level.
For example I have a couple interceptor stacks more or less like this:
<interceptor-stack name="myParamsPrepareParamsStack">
<interceptor-ref name="logger" />
<interceptor-ref name="i18n"/>
<interceptor-ref name="sprache"/>
<interceptor-ref name="paramsPrepareParamsStack">
<param name="exception.logEnabled">true</param>
<param name="exception.logLevel">ERROR</param>
</interceptor-ref>
<interceptor-ref name="init" />
</interceptor-stack>
I want the Parameters for the ExceptionMappingInterceptor to be present
in all interceptor stacks:
<param name="exception.logEnabled">true</param>
<param name="exception.logLevel">ERROR</param>
Is it possible to set them somewhere just once on a global or package level?
Thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Setting interceptor param on package level
Posted by Lukasz Lenart <lu...@apache.org>.
2017-07-29 10:26 GMT+02:00 Norbert Harrer <nh...@gmx.at>:
> Hi.
>
> A question just out of curiosity. Is it possible to set an interceptor
> parameter on the package level.
>
> For example I have a couple interceptor stacks more or less like this:
>
> <interceptor-stack name="myParamsPrepareParamsStack">
> <interceptor-ref name="logger" />
> <interceptor-ref name="i18n"/>
> <interceptor-ref name="sprache"/>
> <interceptor-ref name="paramsPrepareParamsStack">
> <param name="exception.logEnabled">true</param>
> <param name="exception.logLevel">ERROR</param>
> </interceptor-ref>
> <interceptor-ref name="init" />
> </interceptor-stack>
>
> I want the Parameters for the ExceptionMappingInterceptor to be present in
> all interceptor stacks:
>
> <param name="exception.logEnabled">true</param>
> <param name="exception.logLevel">ERROR</param>
>
> Is it possible to set them somewhere just once on a global or package level?
You should be able to create a basic interceptors stack and use it in
your other stacks, so you can configure all the parameters in the
basic stack.
Regards
--
Ćukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org