Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

cookie.getMaxAge reads -1  RSS feed

 
martin brow
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm using cookies for my site, and for debugging I need to see how long cookies are alive to determine whether I should extend their life time or not. The code to create a cookie: (in a login.java)

And to read it out:


But, age reads always -1 (it does die however after 60 seconds, so the setMaxAge(60) works) and path reads "null". The getName and getValue do work, and I can adjust them perfectly... What is wrong with my getPath and getmaxAge()?

thanks for any help!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!