Forums Register Login

problem with cookies.Here's the code.

+Pie Number of slices to send: Send
i am trying t use cookies in servlets.Everytime i am trying to check the condition such as if(cookie==null).This condition is never getting satisfied even after clearing all the cookies of that browser and sending request for the first time.How do i satisfy the condition???

Cookie[] cookie = request.getCookies();

if(cookie==null){out.println("there are no cookies in the browser");}

the above if condition is never getting satisfied.
+Pie Number of slices to send: Send
Exactly how are you getting this reference "cookie"?

Without more code we have no idea what you are trying to do.

Bill
It means our mission is in jeapordy! Quick, read this tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 792 times.
Similar Threads
Not able to retrieve cookie information
cookies
Prevent Duplicate Logins
Disable multiple logins by a user in java web application
Session Management Problem
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 19:00:58.