Izanami Caster wrote:I don't want to use out.println to print table markup (feels a little dirty). Is there a better way to print table rows iteratively within a scriptlet ? Am I doing this the wrong way ? Please advise.
Scriptlets? Yes, you are doing it the wrong way. Scriptlets have been obsolete for well over a decade now. Instead you should be using JSTL tags to generate output -- everything you have there in Java can be written in JSTL, and you can put HTML tags in there and have them go into the response. Give that a try instead.
And yeah, putting out.println in a scriptlet is icky. Back near the turn of the century we had to do that but then they invented JSTL, which is way better to work with.
posted 3 weeks ago
The following worked.
I had to add the following:
1) Add <%@ taglib prefix="c" uri = "http://java.sun.com/jsp/jstl/core" %> to the JSP page. Doing this alone didn't help. So I also did 2.
2) Add the following maven dependency (POM) to support JSTL: