title: Nested forEach loop (JSTL/JSF)
body: <p>I'm new at this and I'm currently editing a friend's existing code, I just wanted to know if there's a simple way of doing a nested for loop in JSTL/JSF for a Java code similar to this one:</p>
  
  <pre><code>blocks=0;
  for(vElement=0; blocks&lt;19; vElement++){
     for(hElement=0; exit&lt;1; hElement++){
        System.out.println(blocks);
        if(blocks!=18){
            blocks++;
        } else{
            exit = 1;
        }
     }
     System.out.println("\n");
  }
  </code></pre>
  
  <p>The output would be something like this:</p>
  
  <pre><code>0   1   2   3   4   5   6
  7   8   9   10  11  12  13
  14  15  16  17  18
  </code></pre>
  
  <p>Everything I've seen on here has something to do with a Backing Bean (and I don't really need that for this one). Any suggestions?</p>