IntelliJ Java IDE
The moose likes Servlets and the fly likes setMaxAge Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "setMaxAge" Watch "setMaxAge" New topic
Author

setMaxAge

Bharatesh H Kakamari
Ranch Hand

Joined: Nov 09, 2000
Posts: 198
When I provide 3600 as a parameter to setMaxAge for Cookies I means I am setting the Cookie age to one hour. How is one hour calculated at the server ? Is it one hour from the actual creation of the cookie. Is there a difference between the Cookie life-time and the actual one hour ?
Bhupinder Dhillon
Ranch Hand

Joined: Oct 12, 2000
Posts: 124
It is one hour from the last accessed time stored in the session.
It is updated everytime you access the session.
 
 
subject: setMaxAge
 
Threads others viewed
setMaxInactiveInterval and <session-timeout> question
writing a cookie to the disk
doubt on Cookies
problem in cookie
Doubt between setMaxAge() and setMaxInactiveInterval() method
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture