I have created a Database Application using Netbeans, GlassFish and JavaDB. Now my controller Servlet code executes some dynamic SQL queries and get back a Result Set (or I can ahange toString). Now, how can I show the returned Result Set in a tabular format ( I have no idea about structure of result set). Can anybody help me about this ?
I have created a Database Application using Netbeans, GlassFish and JavaDB. Now my controller
Share
You can use
Map<String, Object>to represent a “dynamic” row, which is iterable in<c:forEach>. You can useResultSetMetaDatato collect information about the columns such as the column count and the column labels.So, this mapping should do:
You can display it in JSP as follows: