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

The %{#attr.counter.index} is not working

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.20
    • Fix Version/s: 2.3.24
    • Component/s: XML Configuration
    • Labels:
      None

      Description

      Below code is not working in struts 2.3.20

       <c:forTokens items="${images}" delims="," var="imagevar" varStatus="counter" begin="1">                    
      <s:text name="site.intro.intro%{#attr.counter.index}.caption"/>        
      </c:forTokens>
      

      The %{#attr.counter.index} is not returning any value and no exception is thrown in the log the below message is shown:

      WARN  ognl.SecurityMemberAccess      Package of target [javax.servlet.jsp.jstl.core.LoopTagSupport$1Status@680cabbd] or package of member [public int javax.servlet.jsp.jstl.core.LoopTagSupport$1Status.getIndex()] are excluded!
      

      When I set struts.excludedPackageNamePatterns to empty, it works!

        Attachments

          Activity

            People

            • Assignee:
              lukaszlenart Lukasz Lenart
              Reporter:
              afattahi Alireza Fattahi
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: