As we send parameters and their values with hyperlink e.g http:// .....?param=value, in this case value is constant,but if we want to send user input not hard coded value in a text field,how can we capture this value?
Bosun Bello
Ranch Hand
Joined: Nov 06, 2000
Posts: 1506
posted
0
Use request.getParameter and request.getparameterValues to get the parameters sent in from the submission of your form.
Bosun
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Ghazala Islam
Ranch Hand
Joined: Nov 22, 2000
Posts: 73
posted
0
Yoy didn't get my point,I'm asking how to send value that is not constant i.e user input <input type = text name = param > it doesn't have value clause,when user will enter date I want to send that value with url address.
Anonymous
Ranch Hand
Joined: Nov 22, 2008
Posts: 18944
posted
0
If you have the following form: <FORM ACTION="somepage.jsp" METHOD="GET"> <INPUT TYPE="text" NAME="paramOne"> </FORM> If the user enters the value valueOne, then the following page will be requested: somepage.jsp?paramOne=valueOne. If the form method is GET, the form values are tacked on as query parameters. If you use POST, they are sent as post parameters. Either way, they are available via the request object as parameters.