title: How to send the SQL query results to a jsp page?
body: <p>I have a database with the fields id(number), name(string), address(string).</p>
  
  <p>I wrote a java program EmployeeDAO to execute the query. I'm storing it in a ResultSet object <code>rs</code>. I need to display this result set as a table in a JSP page. How do I send this <code>rs</code> to the JSP page?</p>
  
  <pre><code>public class EmployeeDAO 
  {
      public _____ list() throws Exception
      {
          try
          {
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
              String url = "jdbc:odbc:employee_dsn";
              Connection con = DriverManager.getConnection(url);
              Statement stmt = con.createStatement();
              ResultSet rs = stmt.executeQuery("Select * from emp_table");
          }
              catch (Exception e)
          {   
               System.out.println(e);
          }
      }
  }
  </code></pre>