Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-1301

<nested:iterate> loses index with jsp:include

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.1.0
    • Fix Version/s: Future
    • Component/s: Tag Libraries
    • Labels:
      None
    • Environment:
      Operating System: Windows XP
      Platform: PC
    • Bugzilla Id:
      17977

      Description

      POTENTIAL BUG:
      When using nested:interate and placing a jsp:include in the iteration, the
      included jsp cannot retrieve the proper nesting level. Thus any form related
      nested tags are possibly named with duplicate names. ie:

      <input hidden="name[0]" value="name1"/>
      <input hidden="name[0]" value="name2"/>

      COMMENT OF NOTE:
      It appears that tag does NOT lose the actual underlying beans,
      it just loses the proper naming of the index.

      SIMPLE EXAMPLE:

          • testNestedIterate.jsp =
            <nested:root name="narray">
            <nested:iterate property="names">
            BEFORE: <nested:writeNesting /><br />
            <jsp:include page="testNestedIterateInclude.jsp" />
            </nested:iterate>
            </nested:root>
          • testNestedIterateInclude.jsp =
            <nested:root>
            AFTER: <nested:writeNesting />
            Name in bytes: <nested:write property="bytes"/><p />
            </nested:root>

      I will attach the test class throwaway.test.Names
      in a subsequent comment to help document this problem better.
      I've tried to seriously test this before submitting this as
      bug so if any further information is needed please reach me
      at cbutler@mateso.com.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                cbutler@mateso.com Chris Butler
              • Votes:
                1 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated: