Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Can't get HttpCookie expire time ...

843790Jan 17 2008
I am implementing CookieStore that stores permanent cookies to text file. At the program start it must also restore cookies from file(s) for later use.

Problem is that with current implementation of HttpCookie I can't save HttpCookie properly because of no way to store cookie's expiration time (creation + maxage) as there is no method / operation to get / calculate it. I just can't find the way ...

Related to this ... what is HttpCookie.getMaxAge() for if one just can't use the return value because of no other number to compare to. It's nice I can see how long is cookie supposed to live, but it's useless when I dont know when was it 'born'.

Or am I wrong ?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 14 2008
Added on Jan 17 2008
0 comments
154 views