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

s:set with empty body

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5.22
    • 2.5.25, 6.0.0
    • Core Tags
    • 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. diff-2.5.22_2.5.24-SNAPSHOT.pdf
          68 kB
          Pierre-Yves Soblet
        2. 20200814_WW-5086.patch
          2 kB
          Pierre-Yves Soblet

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: