Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.5.1
-
None
Description
I typically extend the existing stacks with my own interceptor references on an as needed basis, as shown below.
The problem I face is that when I use the paramsPrepareParamsStack, I am noticing that the ParametersInterceptor excludes the custom defined entries on the first instance of the named params interceptor; however the second instance in the stack ignores these settings.
<interceptor-stack name="customStack"> <interceptor-ref name="myCustomInterceptor" /> <interceptor-ref name="paramsPrepareParamsStack"> <param name="fileUpload.maximumSize">20480000</param> <param name="params.excludeParams"> dojo\..*,^struts\..*,^session\..*,^request\..*,^application\..*,^servlet(Request|Response)\..*,parameters\...*,submit,myObject\..* </param> </interceptor-ref> </interceptor-stack>
I suspect the code is likely just applying the parameters to the first named instance and breaking the loop rather than making sure all instances of the named interceptor have the parameters applied correctly during Struts2 bootstrapping.
The only workaround I've found is to avoid using the provided interceptor stack directly and copy it into my custom stack and explicitly set the excludeParams explicitly on both params interceptor instances.