Multiple choice technology web technology

What method can be used to retrieve all the parameter names being sent as part of the request by the client?

  1. Use the method 'HttpServletRequest.getParameterNames()' which will return an enumeration of parameter names.

  2. Use the method 'HttpServletResponse.getParameterNames()' which will return an enumeration of parameter names.

  3. Use the method 'HttpServletRequest.getAllParameters()' which will return an enumeration of parameter names.

  4. There is no direct support in the Servlet API to retrieve the name of all the parameters sent by the client.

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

HttpServletRequest.getParameterNames() returns an Enumeration containing the names of the parameters contained in the request. The response object does not handle request parameters, and getAllParameters is not a valid method in the Servlet API.