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?
Use request.getParameter and request.getparameterValues to get the parameters sent in from the submission of your form.
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Joined: Nov 22, 2000
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.
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.