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

action tag violates ParameterAware contract

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.0.10
    • 2.1.0
    • Core Actions
    • None
    • linux,jdk1.5,tomcat5.5

    Description

      the javadoc for ParameterAware states that the values of the map are all java.lang.String[], in other words it is a Map<String,String[]>. Indeed, when hitting an action via a 'genuine' http request, this is true. However, when hitting the action via the action tag, the values in the map are String, not String[]. The bug appears to be possibly line 177 in ActionComponent:

      176: if (parameters != null)

      { 177: newParams.putAll(parameters); 178: }

      The parameters of the component are Map<String,String> and therefore cannot be combined directly into the ActionContext.getParameters map.

      Attachments

        Issue Links

          Activity

            People

              mrdon Donald J. Brown
              davidlmansfield David Mansfield
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: