ho una tabella costruita dinamicamente,cioè prende il num delle righe e delle colonne da input,e fin qui nessun problema,dovrei mettere xò anche un collegamento ipertestuale con cui si può aggiungere una colonna alla fine,come è possibile questo?il codice della tabella è questo:
<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>
<a href=jsp/miejsp/prova/tabdinamica.jsp>
Aggiungi una colonna</a>
<hr>
</center>
</body>
</html>