posted 19 years ago
I'm setting a cookie using:
Cookie cook = new Cookie("Key","This Value");
Right now I have to do the following to retrieve the value of the Cookie:
PrintWriter out = resp.getWriter();
Cookie cookie[] = req.getKookies();
out.println(cookie.length);
for(int i=0;i<cookie.length;i++)
out.println(cookie[i].getValue());
How do I retrieve the value of the Cookie using the key or name of the cookie?
Thanks,
Faisal