Which of the following methods can be used to add cookies to a servlet response?

Which of the following methods can be used to add cookies to a servlet response?




a. HttpServletResponse.addCookie(Cookie cookie)
b. ServletResponse.addCookie(Cookie cookie)
c. HttpServletResponse.addCookie(String contents)
d. ServletResponse.addCookie(String contents)
e. ServletResponse.addHeader(String name, String value)







Answer: A


Learn More :