• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

retrieving cookies

 
Bob Moranski
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13073
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you so much!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic