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

Empty <s:param name="p1" value=""/> is being supressed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3.28
    • 2.5.5
    • Plugin - Tags
    • None

    Description

      I discovered a problem with the <s:param /> tag when attempting to pass an empty parameter.

      <s:url var="myUrl" action='MyAction'>
      <s:param name="p1" value=""/>
      <s:param name="p2"></s:param>
      </s:url>

      I was attempting to pass an empty parameter using the "p1" syntax above and the parameter was being suppressed.

      Using the "p2" syntax it works correctly, and the empty parameter is included.

      The doc http://struts.apache.org/docs/param.html says that "suppressEmptyParameters" defaults to false but the p1 parameter was always suppressed even if I added suppressEmptyParameters="false".

      Also the doc http://struts.apache.org/docs/param.html has an incorrect example on how to use the suppressEmptyParameters option.

      <s:param name="suppressEmptyParameters" value="true"/>

      Attachments

        Issue Links

          Activity

            People

              cn42 Christoph Nenning
              glindholm Greg Lindholm
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: