Hello all My jsp page contain 2 formsand name is form1 form2 . every form action is one action.jsp and method is post. how to read forms data. see code <form name="form1" method="post" action="action.jsp"> <input type="text" name="field1"> <input type="submit" name="Submit" value="Submit"> </form> <form name="form2" method="post" action="action.jsp"> <input type="text" name="field1"> <input type="submit" name="Submit" value="Submit"> </form>
Senior software engineer
Thiru Thangavelu
Ranch Hand
Joined: Aug 29, 2001
Posts: 219
posted
0
When you use POST the entire form object will be passed. So I think you can use the <formname>.<fieldname> to read the data. Correct me guys, If I am wrong.
Thanks,<br />Thiru<br />[SCJP,SCWCD,SCBCD]
Bosun Bello
Ranch Hand
Joined: Nov 06, 2000
Posts: 1506
posted
0
You need to use request.getParameter(), reguest.getParameterValues() to read your form data.
Bosun
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley