title: How to loop over a specific condition in JSTL? (e.g. while)
body: <p>I need to basically do a while loop in jstl, however the answers I've found so far are telling me to use forEach. However, I can't figure out why that is a solution.</p>
  
  <p>I'm trying to run a piece of code only when a certain condition is true, not iterate through a list. Therefore, I won't be using the "items" attribute in the forEach tag.</p>
  
  <p>So, how can one loop until a condition is false in JSTL?</p>
  
  <p>Right now, I have something like this:</p>
  
  <pre><code>&lt;c:forEach &gt;
      &lt;c:if test="${abcd:processNextRow (bean) eq 'true'}"&gt;
      &lt;!-- This is the condition that should exit the 'while' loop. --&gt;
          ${bean.arrayVar[0]}
      &lt;/c:if&gt;
  &lt;/c:forEach&gt;
  </code></pre>