How to insert a table ( Html code) into a Java servlet

user2161721 picture user2161721 · Mar 22, 2014 · Viewed 8.5k times · Source

I'm implementing MVC using JSP and JDBC. I have imported a database class file to my JSP file and I would like to show the data of a DB table. I don't know how I should return the ResultSet from the Java class to the JSP page and embed it in HTML.

How can I achieve this?

Answer