The request object holds all the information coming to the server from the browser. For now, we will focus mainly on one collection contained within the object: Parameter.
A collection is simply a number of related items grouped together. For example, you might keep your collection of music (CD’s, tapes, etc) in a special rack designed to hold them.
The Parameter collection contains all name/value pairs for the Form and the QueryString. The name of the field is the key to the collection. For example, if you had a form field named "firstName," and you wanted to store the value in a variable named "firstname," the code would look like this:
[][]
firstName = request.getParameter("firstName");
[][
]
Values always come back as a String. You would have to do an explicit conversion for other data types:
[][]
age = Integer.parseInt(request.getParameter("age"));
[][
]