getParameterValues() Method Of The Request Object

This section illustrates you about the getParameterValues() method of the request object.

getParameterValues() Method Of The Request Object

getParameterValues() Method Of The Request Object

     

This section illustrates you about the getParameterValues() method of the request object. Here, you will learn more about the getParameterValues() method like what's the need of using the method in your JSP application. And how is it used? You will get the solution of all such types of the questions after completing the section.

This is the method of the request object used for getting the string array containing all of the values which are contained by the request parameter. This method takes a String type parameter which is the name of the field of the html form. This method is used where the array of controls of the HTML lies. All the control of the HTML form contains same name and then makes a control array.

Syntax of the getParameterValues() method of the request object:

String[] parameterValues = request.getParameterValues();

Above line of the code determines the values in a string array retrieved by the getParameterValues() method of the request object.

Here is the JSP code of the GetParameterValuesMethod.jsp file:

Output for the GetParameterValuesMethod.jsp file:

Download the GetParameterValuesMethod.jsp file.