title: help using an ArrayList with my resultSet
body: <p>I have a resultSet that has a different number of results every time, and needs to be used multiple times on my page.  Currently, I am storing my results in an ArrayList, and was planning to just loop through the arraylist.  I dont know how many rows So this is what I have so far:</p>
  
  <pre><code>  while (result.next()) {    
        tmpTerms.add(term = (((result_data = result.getObject("val_internal_code"))==null || result.wasNull())?" ":result_data.toString()));
        tmpTerms.add(desc = (((result_data = result.getObject("val_external_representation"))==null || result.wasNull())?" ":result_data.toString()));
        tmpTerms.add(sorter = (((result_data = result.getObject("sorter"))==null || result.wasNull())?" ":result_data.toString()));
        tmpTerms.add(sDate = (((result_data = result.getObject("sDate"))==null || result.wasNull())?" ":result_data.toString()));
    }
  </code></pre>
  
  <p>Okay, so when I run this, the system prints:
  Code:</p>
  
  <pre><code>[2011SP, Spring 2011, 1, 11-15-2010, 2011SU, Summer 2011, 1, 01-15-2011, 2011FL, Fall 2011, 1, 04-01-2011, 2010Q2, CE Qtr 2 2010 Dec - Feb, 2, 08-01-2010, 2011Q3, CE Qtr 3 2011 Mar - May, 2, 11-01-2010, 2011Q4, CE Qtr 4 2011 Jun - Aug, 2, 02-01-2011, 2011Q1, CE Qtr 1 2011 Sep-Nov, 2, 05-01-2011]
  </code></pre>
  
  <p>I dont know if this is the correct way of doing it or not, but it is working so far, so what I want to do now is use my allTerms arrayList, and separate them into rows, so I want to split every 4 results into a separate row. (So it would be 2011SP, Spring 2011, 1, 11-15-2010 as one row and so on), next, I would need to transfer these results to parts of a HTML page. so for ex:</p>
  
  <pre><code>&lt;table class="t1"&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;!--Here I would want to show all rows from the allTerms arrayList with a "sorter" of 1--&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  &lt;table class="t2"&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;!--Here I would want to show all rows from the allTerms arrayList with a "sorter" of 1 and a term of ....SU (where '....' is the year) --&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>