Hi,

    Come-on !
It is so hard to transform a date in seconds??
Hint:
 create two GregorianCalendar objects  one for today
and another for the date you want your cookie to expire.
Than check how can you calc the difference between them.
Maybe the getTimeInMillis method will help.

Hope it helps,
            Andras.

----- Original Message -----
From: "Naveen Chandra" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 30, 2000 4:45 PM
Subject: Setting Cookie's time


> Hi Friends,
>
> Could you please help me in setting the Cookie time to expire
> to certain date only in the form of year, month, day and time.
> As in the API for Cookie class there is only one method
> I found getMaxAge() and setMaxAge(int expire) .
> I am sorry this may silly question to ask here
> how to setMaxAge(int expire)  to required time only
> not just like 300 seconds or so on.
>
> Thanks in Advance,
> Naveen.
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to