Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-2795

NoParameters blocks action tag params instead of request params

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • 2.1.2
    • 2.1.3
    • Core Interceptors
    • 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,

      Attachments

        Activity

          People

            Unassigned Unassigned
            kirchner Raphael Kirchner
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: