View Single Post
  #3 (permalink)  
Old 09-29-2008, 10:51 PM
ShoeNinja's Avatar
ShoeNinja ShoeNinja is offline
Senior Member
 
Join Date: Oct 2007
Posts: 123
ShoeNinja is on a distinguished road
Send a message via AIM to ShoeNinja
I think it's in your while loop at the end of your code.

Code:
Boolean b = it.hasNext(); %> <% while(b) { Object[] row = (Object[])it.next(); %> <option value="<%=(String) row[0]%>"><%=(String) row[0]%></option> <%} %>
Boolean b is only being checked once, not after each iteration of the loop like you intended.

Try this:
Code:
%> <% while(it.hasNext()) { Object[] row = (Object[])it.next(); %> <option value="<%=(String) row[0]%>"><%=(String) row[0]%></option> <%} %>
Putting hasNext in the loop condition will make sure that it is checked each time through the loop.

I could be wrong though.
Reply With Quote