<%
StringBuffer iListTable= new StringBuffer();
IList tmp = ics.GetList("listname");
if (tmp!=null && tmp.hasData()){

  int cols = tmp.numColumns();
  iListTable.append("<table>");
  
   //Column Names
   for (int x = 0;x<cols;x++){
      iListTable.append("<th>"+tmp.getColumnName(x)+"</th>");
   }
  
   iListTable.append("<tr>");
   //Column Values
   do {
    for (int y = 0;y<cols;y++){
      iListTable.append("<td>"+ tmp.getValue(tmp.getColumnName(y)) +"</td>");
    }
   }
   while(tmp.moveToRow(IList.next, 0));
}

iListTable.append("</table>");
out.print(iListTable.toString());

%>