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

Space character and includeParams

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.28
    • 2.3.31, 2.5.5
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: