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

Space character and includeParams

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.28
    • Fix Version/s: 2.3.31, 2.5.5
    • Component/s: None
    • Labels:
      None

      Description

      With this JSP snippet using Struts 2 taglib:

      myParameter=[<s:property value="%{#parameters['myParameter']}"/>]
      <br/>
      <s:url action="url" includeParams="get"/>
      <br/>
      <s:url action="url">
          <s:param name="myParameter" value="%{#parameters['myParameter']}"/>
      </s:url>
      

      When the action is called with a parameter containing a space (which is escaped in the URL) :

      localhost:8080/url?myParameter=with+space
      

      The output is as follows :

      myParameter=[with space]
      /url.action?myParameter=with%2Bspace
      /url.action?myParameter=with+space    
      

      The includeParams attribute of the “url” tag seems to transform the "space" character into the "plus" character (both in their url-encoded forms).

        Attachments

        1. Struts2UrlTest.zip
          5 kB
          Pierre-Yves Soblet

          Issue Links

            Activity

              People

              • Assignee:
                cn42 Christoph Nenning
                Reporter:
                pys Pierre-Yves Soblet
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: