Struts 1
  1. Struts 1
  2. STR-1301

<nested:iterate> loses index with jsp:include

    Details

    • Type: Bug Bug
    • Status: Reopened
    • Priority: Minor 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

      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.

      1. ASF.LICENSE.NOT.GRANTED--testInnerTwo.jsp
        0.3 kB
        Christine
      2. ASF.LICENSE.NOT.GRANTED--testInnerJunk.jsp
        0.2 kB
        Christine
      3. ASF.LICENSE.NOT.GRANTED--testInnerOne.jsp
        0.8 kB
        Christine
      4. ASF.LICENSE.NOT.GRANTED--testBase.jsp
        0.4 kB
        Christine
      5. ASF.LICENSE.NOT.GRANTED--StrutsInnerBean.java
        1 kB
        Christine
      6. ASF.LICENSE.NOT.GRANTED--StrutsBaseForm.java
        2 kB
        Christine
      7. ASF.LICENSE.NOT.GRANTED--testNestedIterateInclude2.jsp
        0.1 kB
        Chris Butler
      8. ASF.LICENSE.NOT.GRANTED--testNestedIterateInclude.jsp
        0.7 kB
        Chris Butler
      9. ASF.LICENSE.NOT.GRANTED--requestScope.jsp
        1 kB
        Chris Butler
      10. ASF.LICENSE.NOT.GRANTED--testNestedIterateInclude.jsp
        0.3 kB
        Chris Butler
      11. ASF.LICENSE.NOT.GRANTED--testNestedIterate.jsp
        0.5 kB
        Chris Butler
      12. ASF.LICENSE.NOT.GRANTED--Names.java
        0.3 kB
        Chris Butler

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              Chris Butler
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Development