<%@taglib prefix=\"c\" uri=\"http://java.sun.com/jsp/jstl/core\" %>
<%@taglib prefix=\"sql\" uri=\"http://java.sun.com/jstl/sql\" %>
My advice would be to forget about the
tags completely, and to make all your database operations in plain Java (in a servlet or action of your preferred MVC framework). This servlet would build a list of bean instances, ready to be displayed by your JSP. Use RequestDispatcher
to dispatch the request to the JSP from the servlet.
Even the official Java EE tutorial says:
The JSTL SQL tags for accessing databases listed in Table 7-7 are designed for quick prototyping and simple applications. For production applications, database operations are normally encapsulated in JavaBeans components.