I need to inherit paramsPrepareParamsStack inceptor stack into mystack and need to override vilidation interceptor parameters. How do i do it?
views:
12answers:
2
A:
Simply copy the entire stack into your struts.xml and override the parameters as needed:
<interceptor-stack name="paramsPrepareParamsStack">
<interceptor-ref name="exception"/>
<interceptor-ref name="alias"/>
<interceptor-ref name="params"/>
<interceptor-ref name="servletConfig"/>
<interceptor-ref name="prepare"/>
<interceptor-ref name="i18n"/>
<interceptor-ref name="chain"/>
<interceptor-ref name="modelDriven"/>
<interceptor-ref name="fileUpload"/>
<interceptor-ref name="checkbox"/>
<interceptor-ref name="staticParams"/>
<interceptor-ref name="params"/>
<interceptor-ref name="conversionError"/>
<interceptor-ref name="validation">
<param name="excludeMethods">your,methods,skip,validation</param>
</interceptor-ref>
<interceptor-ref name="workflow">
<param name="excludeMethods">your,methods,skip,validation</param>
</interceptor-ref>
</interceptor-stack>
Pat
2010-07-23 10:47:49
What will happen if i specify as <interceptors> <interceptor-stack name="ehspre2stack"> <interceptor-ref name="paramsPrepareParamsStack"> <param name="validation.excludeMethods"> list,loadedit,remove,execute,reset </param> </interceptor-ref> </interceptor-stack> </interceptors>
Jothi
2010-07-23 13:34:03
I don't think it'll work, but feel free to give it a try.
Pat
2010-07-23 17:12:02
A:
the below code executes well..
<interceptors>
<interceptor-stack name="ehspre2stack">
<interceptor-ref name="paramsPrepareParamsStack">
<param name="validation.excludeMethods">
list,loadedit,remove,execute,reset,loadAdd
</param>
<param name="exception.logEnabled">true</param>
<param name="exception.logLevel">ERROR</param>
</interceptor-ref>
</interceptor-stack>
</interceptors>
Jothi
2010-08-12 05:41:35