title: Iterating multi dimensional array with jstl
body: <p>I am trying to iterate through a multidimensional array of string and print its values. But all my loop does is print the first row multiple times. </p>
  
  <pre><code>String[][] myArray;
  </code></pre>
  
  <p><strong>Values in myArray:</strong></p>
  
  <pre><code>Tom     Decker      Male    20
  Julie   Hanson      Female  25
  Toby    Jackson     Male    30
  </code></pre>
  
  <p><strong>Loop:</strong>           </p>
  
  <pre><code>&lt;c:forEach var="rowData" items="${myArray}"&gt;
      &lt;tr&gt;
          &lt;c:forEach var="cellData" items="${rowData}" &gt;
              &lt;td&gt;&lt;c:out value="${cellData}"&gt;&lt;/c:out&gt;&lt;/td&gt;                    
          &lt;/c:forEach&gt;
      &lt;/tr&gt;
  &lt;/c:forEach&gt;
  </code></pre>
  
  <p>Instead of printing all the data, it prints the first record 3 times like below. </p>
  
  <pre><code>Tom     Decker      Male    20
  Tom     Decker      Male    20
  Tom     Decker      Male    20
  </code></pre>
  
  <p>So it seems that the loops(inner and outer both) are iterating the right number of times. But the outer loop is not pointing to the next record after each iteration. </p>