codice:<html> <head> <title>My JSP 'tabdinamica.jsp' starting page</title> </head> <body> <center> <h1>Tabella dinamica</h1> <form method="post" action="jsp/miejsp/prova/tabdinamica.jsp"> Larghezza tabella (<16) = <input type="text" name="WIDTH" value="0" size="2">, Altezza tabella (<16) = <input type="text" name="HEIGHT" value="0" size="2">, <input type=submit value="Disegna!"> </form> <hr> <% String w = request.getParameter("WIDTH"); String h = request.getParameter("HEIGHT"); if(w == null) w = "0"; if(h == null) h = "0"; int width = Integer.parseInt(w); int height = Integer.parseInt(h); if(width>15) width = 15; if(width<0) width = 0; if(height>15) height = 15; if(height<0) height = 0; <table border=0 cellpadding=0 cellspacing=0> <% for(int y=0; y<=height; y++){ %> <tr> <% for(int x=0; x<=width; x++){ <td> (<%=x%>, <%=y%>) </td> <% } %> </tr> <% } %> </table> Aggiungi una colonna <hr> </center> </body> </html>