aspose file tools*
The moose likes Servlets and the fly likes How to send user input to servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to send user input to servlet" Watch "How to send user input to servlet" New topic
Author

How to send user input to servlet

Ghazala Islam
Ranch Hand

Joined: Nov 22, 2000
Posts: 73
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: 1510
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
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
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to send user input to servlet