I am new to using JSP and i'm trying to do something like:
<% for (int i=0; i<numTables; i++) { %>
<h3> person <%=i%></h3>
<% } %>
numTables is a variable in the HomeController class.
I've also executed in the controller:
model.addAttribute("numTables", numTables);
and if I write:
<h1>${numTables}</h1>
It prints the correct value. But I couldn't find a way to put this value as the
value of numTables in the for loop.
please help. thanks.
Edit: It has to be done with scriptlets.