Meaningless Drivel is fun!
The moose likes Servlets and the fly likes Cookie's... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Cookie Watch "Cookie New topic


Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
As far as i know a cookie is a bit of info sent by the web server to the browser that can be later read back from that browser.
My question is how does the web server/servlet know what info to send to the browser. In the servlet, where should i store the info to send to the browser. I have a simple cookieservlet which will print out the cookies and is setting a cookie.
In setting a cookie, i have
String name = req.getParameter("cookieName");
String value = req.getParameter("cookieValue");
I am not sure what this value contains, does this hold anything we want to store?
I am new to this concept, please let me know.
I agree. Here's the link:
subject: Cookie's...
It's not a secret anymore!