getParameterNames() Method Of The Request Object
This section gives you the detailed explanation about the getParameterNames() method of the request object. You will learn more about the procedure of using the getParameterNames() method of the request object. Why the method used and how to use? All the things about the getParameterNames() method is explained in this section which facilitates you for working with the method in efficient manner.
This is the method of the request object used for getting the enumeration of the attributes of the html form. These values are later retrieved through the java programming language by enumerating the retrieved enumerated data by the method of the request object.
This section provides JSP file which complete code is given below, provides the facility of getting all the attribute name of the html form. When you will submit the html form, JSP code executes and shows all the parameter name from the query string by using the method getParameterNames() of the request object.
Syntax of the method is as follows:
Enumeration e = request.getParameterNames();
Above line of the code store the retrieved data (in the enumeration form) through the getParameterNames() method of the request object to the Enumeration type variable e.
Here is the JSP code of the GetParameterNamesMethod.jsp file:
Output for the above code: