But violates best practices. Scriptlets should no longer be used in JSPs. The JSTL and EL are more appropriate choices.
Joined: Jul 06, 2005
And I guess while we're talking best practice, it would be worth noting that SQL code doesn't belong on a JSP page either.
You should never be dealing with a result set object in a JSP.
Write a bean method that runs the query and copies the result into a List of beans.
Your JSP page can then iterate over that list.