First you have to put your resultset into a list of Objects. For example:
ArrayList<Extcteach> extcteachList = new ArrayList<Extcteach>();
while(resultset .next()) {
Extcteach extcteach = new Extcteach ();
extcteach.setAttr1 = (result.getString("column1")
extcteach.setAttr2 = (result.getString("column2")
/****THIS FOR EACH COLUMN OF YOUR TABLE****/
extcteachList.put(extcteach)
}
Now you have a list of object so in your jsp u have to do something like this:
<table>
<%
for(int i=0; i < extcteachList.size(); i++) {
%>
<tr>
<td> <%= extcteachList.get(i).getAttr1() %> </td>
<td> <%= extcteachList.get(i).getAttr1() %> </td>
<tr>
<%
}
%>
</table>
NB: you have to create the Extcteach class
solved Display sql database on webpage