How to read a cookies sending via a servlet ?

How to read a cookies sending via a servlet ? what are the way to do this ?

  • Rabi
  • 23 Jul 2018
  • 601 Views
  • 1 Answer
Your Answer

you need to create an array of javax.servlet.http.Cookie objects by calling the getCookies( ) method of HttpServletRequest. then use a for loop and print the cookies details by using the methods getName() and getValue().

Advance Java

Didn't get the answer.
Contact people of Talent-Advance Java directly by clicking here