If you want the cookie to be persisted on the client machine, you have to
set a maximum age that is not equal to -1.
    (*Chris*)

----- Original Message -----
From: Catharine Barnes <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 20, 1999 8:44 AM
Subject: using cookies within servlets


> I am trying to set a new cookie within a servlet.
> I was not sure what the path attribute should be set to , so I have set it
> to '/' as this is the path of other cookies I have seen.
> When I run my servlet the browser asks me if I will accept the cookie, but
> doesn't actually create it.
>
> The URL of my servlet is: http://host:8080/servlet/servletname
> If I do not set the domain of the cookie, when the browser asks me to
accept
> the cookie it thinks the domain is host.
> Thinking that this was wrong I tried setting it to host:8080/servlet and
> just /servlet. However, changing the domain meant that the browser did not
> ask me whether to accept the cookie or not.
>
> Can anyone tell me where I am going wrong?
> I am a beginner to both servlets and cookies.
>
> Thanks,
> Catharine
>
>
___________________________________________________________________________
> 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