title: Foreach loop in a jsp page - Ending and Continuing a List
body: <p>I just wanted to know how can I end a list of items in a particular column and continue the remaining items in a separate column. For instance: In the first column, there are rows having the value of "item1", "item2", "item3" and in the second column as a continuation, there are values "item4", "item5", "item6".</p>
  
  <p>Actually, I want to have 4 columns having 5 items for each continuously. How can I apply this on the code below using a foreach loop in a jsp page?</p>
  
  <pre><code>&lt;table&gt;
      &lt;c:forEach items="${itemList}" var="item"&gt; 
          &lt;tr&gt;
              &lt;td&gt;&lt;input type ="submit" class="Items btnColor" 
                         value="${item.itemName}" label ="${item.itemId}" /&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/c:forEach&gt;
  &lt;/table&gt;    
  </code></pre>
  
  <p>Please help, thank you very much!</p>