*
The moose likes Servlets and the fly likes retrieving cookies Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "retrieving cookies" Watch "retrieving cookies" New topic
Author

retrieving cookies

Bob Moranski
Ranch Hand

Joined: Nov 22, 2000
Posts: 177
Hi, I have a servlet that extracts cookies from its HttpServletRequest's getCookies() method. But what confuses me is does the getCookies get ALL the cookies that the client has or just the ones specific to this server or even session? How does HttpServletRequest determine which cookies to return?
Thanks!
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
HttpServletRequest has all of the cookies that the browser sent, but the browser only sends those that are specific to that particular URL - see rfc2109 for details of how cookies are identified with URLs. One place to get a copy is:
http://www.cis.ohio-state.edu/htbin/rfc/rfc2109.html
Bill

------------------
author of:
Bob Moranski
Ranch Hand

Joined: Nov 22, 2000
Posts: 177
Thank you so much!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: retrieving cookies
 
Similar Threads
Cookies
get action property
User gets logged out automatically
New to cookies
Question on Cookie