Although JSTL has an "sql" library that will perform various database operations, it is recommended only for prototyping, and not for real production applications. If you want to learn how to use them, though, this is a good article.
The best practice for accessing a database in a web application is to create model classes in the form of JavaBeans that represent the data upon which your application is based. For example an HR application you'd have classes like Employee, Department, Address, Company, etc. You'd also create other classes with methods that will translate the above objects to and from rows and columns in the database. For example, you might have an EmployeeDAO class with a method getEmployeesByDepartment(String dept) that would return a collection of Employee objects.
Another option would be to use an object relational mapping tool such as Hibernate that handles writing the underlying SQL statements for you.
Once you have these model objects either in collections or as individual instances, you can then use jstl tags like c:forEach and cut to iterate through collections of these model objects and display their properties. [ October 23, 2007: Message edited by: Merrill Higginson ]