title: Struts 1 Nested tags: getting unexpected html
body: <p>I am working on an old application using Struts 1. We are using nested tags. For below code:</p>
  
  <pre class="lang-xml prettyprint-override"><code> &lt;nested:form action="/save.do?method=save"&gt;
       &lt;h2&gt;Indexed Property Example&lt;/h2&gt;
  
        &lt;nested:iterate property="lines" indexId="idx"&gt;
           Name: &lt;nested:text property="name"  indexed="true"/&gt;
           Town: &lt;nested:text property="town" indexed="true"/&gt;
              &lt;nested:iterate property="inches" indexId="j"&gt;
                  Inch: &lt;nested:text  property="length" indexed="true"&gt;&lt;/nested:text&gt;
              &lt;/nested:iterate&gt;   
        &lt;/nested:iterate&gt;
     &lt;nested:submit value="save" /&gt;
  &lt;/nested:form&gt;
  </code></pre>
  
  <p>I am getting below html:</p>
  
  <pre class="lang-xml prettyprint-override"><code>     &lt;h2&gt;Indexed Property Example&lt;/h2&gt;
  
  
           Name: &lt;input name="nestedForm[0].lines[0].name" value="" type="text"&gt;
           Town: &lt;input name="nestedForm[0].lines[0].town" value="" type="text"&gt;
  
                  Inch: &lt;input name="nestedForm[0].lines[0].inches[0].length" value="0" type="text"&gt;
  
                  Inch: &lt;input name="nestedForm[1].lines[0].inches[1].length" value="0" type="text"&gt;
  
  
     &lt;input name="" value="save" type="submit"&gt;
  </code></pre>
  
  <p>If you see in second Inch label we have nestedForm[1] it should be 0. I have to change to this data and submit back to server. If I change it directly in html struts populate all objects automatically. Can anyone suggest me if I am doing anything wrong here.</p>