Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Not A Problem
-
2.1.2
-
None
Description
According to JavaDoc, org.apache.struts2.interceptor.NoParameters should be "should be implemented by actions that do not want any parameters set on them automatically. This may be useful if one is using the action tag and want to supply the parameters to the action manually using the param tag."
Actually something like the opposite happens: The action tag param gets blocked and the request param is used instead
Example:
<@s.action name="Foo" executeResult="true" ignoreContextParams="true" >
<@s.param name="input">embedded</@>
</@s.action>
With Foo implementing NoParams,
1) Foo.action results in Foo.input == NULL
2) Foo.action?input=test results in Foo.input == "test"
Where it should be "embedded" in both cases.
<@s.action name="Foo" executeResult="true" ignoreContextParams="true" >
</@s.action>
With Foo implementing NoParams,
1) Foo.action results in Foo.input == NULL
2) Foo.action?input?test results in Foo.input == "test"
Where it should be NULL in both cases,