This is the current code i am trying to use. I was looking up online and <% and %> escape in order to use something like a for loop. So far <% is just printed on the page.
out.print("<table border = \"1\"> <%for(int i = 0; i < l; i++) { <tr><th>i</th></tr> }%>");