This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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...
Similar Threads
Chapter 6(Session Management) notes (HFSJ) for revision
HttpServletResponse.addCookie same as HttpServletResponse.setHeader ??
Confusion between Cookie and JSession
cookie explanation