• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

Cookie Problem

 
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am creating a cookie with Struts action called using Ajax function, after cookie gets created, i am reading it on the same page but i am not able to get new cookie name/values, if i refresh this page, i am able to see new cookie value. So, is it necessary to refresh to get new cookie values ?
 
Sheriff
Posts: 67503
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cookies are created by the browser as a result of sending the proper headers, so yes, the cookie isn't actually created until the response is sent to the browser.
 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

ujjwal soni wrote:Hi,

I am creating a cookie with Struts action called using Ajax function, after cookie gets created, i am reading it on the same page but i am not able to get new cookie name/values, if i refresh this page, i am able to see new cookie value. So, is it necessary to refresh to get new cookie values ?



Can you please post the piece of code where you read the cookie?
reply
    Bookmark Topic Watch Topic
  • New Topic