Iterating through result set is easy in JSTL. Review the code sample below.

Java Code:
<sql:query   var="hobbies" sql="SELECT * FROM HOBBIES">
</sql:query>

<c:forEach var="myhobbies" items="${hobbies.rows}">

</c:forEach>