title: Using for loop inside of a JSP
body: <p>I want to loop through an <em>ArrayList</em> of "Festivals" and get their information with <em>get</em> methods, printing out all its values. For some reason when I use this code, it will always choose the "0"th value and not increment the loop.</p>
  
  <p>If I hard code the values as "get(1)" it will get the correct values so my issue is clearly with the syntax.</p>
  
  <pre><code>&lt;h1&gt;All Festival Information&lt;/h1&gt;
      &lt;jsp:useBean id="allFestivals" type="java.util.ArrayList" scope="session" /&gt;
      &lt;table border="1"&gt;
          &lt;tr&gt;
              &lt;td&gt;Festival Name:&lt;/td&gt;
              &lt;td&gt;Location:&lt;/td&gt;
              &lt;td&gt;Start Date:&lt;/td&gt;
              &lt;td&gt;End Date:&lt;/td&gt;
              &lt;td&gt;URL:&lt;/td&gt;
          &lt;/tr&gt;
          &lt;% for(int i = 0; i &lt; allFestivals.size(); i+=1) { %&gt;
              &lt;tr&gt;      
                  &lt;td&gt;${allFestivals.get(i).getFestivalName()}&lt;/td&gt;
                  &lt;td&gt;${allFestivals.get(i).getLocation()}&lt;/td&gt;
                  &lt;td&gt;${allFestivals.get(i).getStartDate()}&lt;/td&gt;
                  &lt;td&gt;${allFestivals.get(i).getEndDate()}&lt;/td&gt;
                  &lt;td&gt;${allFestivals.get(i).getURL()}&lt;/td&gt;  
              &lt;/tr&gt;
          &lt;% } %&gt;
      &lt;/table&gt; 
  </code></pre>