title: Generating dynamic table using jsp
body: <p>I am using jsp to display data from oracle database. the number of column in table may change each time for different users.</p>
  
  <p>I am able to retrieve column label as below:</p>
  
  <pre><code>rsmd = result.getMetaData();
         columns = rsmd.getColumnCount();
  for (int i=1; i&lt;=columns; i++) {
               out.write("&lt;th&gt;" + rsmd.getColumnLabel(i) + "&lt;/th&gt;");
  </code></pre>
  
  <p>The connection:</p>
  
  <pre><code>Class.forName("oracle.jdbc.driver.OracleDriver");
                                      String url = "jdbc:oracle:thin:@localhost:8081:BI";
                                      String username = "tech";
                                      String password = "****";
                                      Connection conn = DriverManager.getConnection(url, username, password);
                                      Statement stmt = conn.createStatement();
  String query = "SELECT * from item_table";
   ResultSet rs = stmt.executeQuery(query);
                              while (rs.next()) {
  }
  </code></pre>
  
  <p>But i am facing problem in retrieving column data as the column datatypes are different. Is there any way to retrieve data without mentioning the type of "cell"?</p>
  
  <p>Any input will be appreciated.</p>