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 ?


1 Answer
1-1 of  1
1 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