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

s:set with empty body

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.22
    • Fix Version/s: 2.5.25, 2.6
    • Component/s: Core Tags
    • Labels:
      None

      Description

      In Struts 2.5.22, the following JSP fragment:

      <s:set var="myVariable"> </s:set>
      <s:property value="#myVariable"/>
      

      generates the following HTML fragment:

      com.sample.MyAction@c1a47f6c 
      

      I would expect an empty output (as trimBody is set to "true" by default).

       

      Moreover, when the set tag body is empty:

      <s:set var="myVariable" trimBody="false"/>
      <s:property value="#myVariable"/>
      

      disregarding the value of the trimBody attribute, the output is the same:

      com.sample.MyAction@c1a47f6c
      

       

        Attachments

        1. 20200814_WW-5086.patch
          2 kB
          Pierre-Yves Soblet
        2. diff-2.5.22_2.5.24-SNAPSHOT.pdf
          68 kB
          Pierre-Yves Soblet

          Activity

            People

            • Assignee:
              lukaszlenart Lukasz Lenart
              Reporter:
              pys Pierre-Yves Soblet
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: