index.html
<form action="table2.jsp">
Name:<input type="text" name="j"><br>
Address:<input type="text" name="k"><br>
phone:<input type="text" name="h"><br>
<input type="Submit" value="SUBMIT"><br>
<input type="button" value="SAVE" onclick="table1.jsp">
</form>
table1.jsp
<% String a,b,c;
int d=0,e=0,f=0;
String l[]=new String[d];
String m[]=new String[e];
String n[]=new String[f];
a=String.valueOf(request.getParameter("j"));
b=String.valueOf(request.getParameter("k"));
c=String.valueOf(request.getParameter("h"));
l[0]=String.valueOf(a);
m[0]=String.valueOf(b);
n[0]=String.valueOf(c);
out.print("SAVED");
d++;e++;f++;
%>
on clicking "SAVE" button it should run the table1.jsp and the values from the textfield in the index.html should get inside the array created in table1.jsp and increment the value of d,e,f every time "SAVE" button is clicked.Help me find out what mistake am I doing?