I have code which returns a database query as a list. I need to be able to select individual elements of this list and place them in an html table.
for (ListIterator i = empList.listIterator(); i.hasNext(); ) {
//out.println("<tr><td>"+i.next().get(0)+"</td></tr>");
//above doesn't work, below works but only returns all 8 elements of list
out.println("<tr><td>"+i.next()+"</td></tr>");
}
In the above code, I'd like to expand it to have 8 td elements. The list has 8 elements. I tried using the Get method, but the API is as cryptic as ever as far as the syntax goes.
Contents of i.next():101, Joe, A, Coyne, 111-22-3333, HR, 125, 3726
Aaron Parker
[ November 22, 2004: Message edited by: Aaron Parker ]
[ November 22, 2004: Message edited by: Aaron Parker ]