Multiple choice

Which of the following is/are the correct statements about the setHeader method of the HttpServletResponse interface?

  1. This method allows us to add a name/value field to the response header.

  2. By using this method, the web server sends a special method to the browser to request another page.

  3. This method allows us to get the parameter names and values.

  4. This method can be used in HttpServletRequest interface.

  5. Both (1) and (2)

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

setHeader method is used to add name/value field for the request in the response header.