You can use Map to represent a "dynamic" row, which is iterable in . You can use ResultSetMetaData to collect information about the columns such as the column count and the column labels.
So, this mapping should do:
List
You can display it in JSP as follows: