struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <lukaszlen...@apache.org>
Subject Re: Setting interceptor param on package level
Date Mon, 31 Jul 2017 09:46:45 GMT
2017-07-29 10:26 GMT+02:00 Norbert Harrer <nharrer@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


Mime
View raw message