Thanks for the information & advice. I have been reading Cookie
specification from Netscape. Found lot of info there. But I am using IE
(not Netscape), and I could'nt see the file getting created in
c:\windows\cookies. I'll try Netscape also, and see if any cookie file gets
created in the profile directory(u must be right as u have seen it).
-mukul
At 03:14 PM 5/22/99 +0200, you wrote:
>Mukul Gandhi wrote:
>
>I cannot ensure you I am completly right, but here's what I think..
>
>> Hi,
>> 1. I have a doubt regarding Cookie.setMaxAge(int expiry) function. In a
>> servlet, I invoke function setMaxAge(120) on a Cookie. This will set the
>> expiry date of the cookie as 120 seconds. Is the expiry clock for the
>> cookie running on server or the client ? If clock is running on the server
>> then does the clock stops after servlet instance shuts down(or after httpd
>> stops running)..
>
>In cookie specification we can read that expiration is in terms of date, so
>servlet API must translate the maxAge property of cookie into datetime..
>
>""""""""""""""""""""""""""""""""""""""""""
>expires=DATE
> The expires attribute specifies a date string that defines the valid
life
>time of that cookie. Once the expiration date has
> been reached, the cookie will no longer be stored or given out..
>
> The date string is formatted as:
>
> Wdy, DD-Mon-YYYY HH:MM:SS GMT
>
> This is based on RFC 822, RFC 850, RFC 1036, and RFC 1123, with the
>variations that the only legal time zone is GMT and
> the separators between the elements of the date must be dashes..
>
> expires is an optional attribute. If not specified, the cookie will
>expire when the user's session ends..
>"""""""""""""""""""""""""""""""""""""""""""""""
>It seems that the maxAge is translated into datetime, then the client
checks it
>for the cookie..
>
>
>>
>>
>> 2. Where on the client PC does cookie stored(on windows , and on unix
>> also). I cannot see anything created in c:\windows\cookies directory when
>> the servlet sends the cookie. Is the cookie getting stored on the client in
>> file sk.txt in JWS root directory ? I have JWS installed, but on actual
>> clients in which directory servlet cookies will be stored(should be in
>> browser specific cookie directory I think !)
>>
>
>If max Age is positive and does not expires when the session ends the browser
>stores cookie into a file. I can find in my Netscape profile directory the
file
>cookies.txt where I suppose the cookies are stored..
>
>My advice: read Netscape spec for cookies (it is really not long) and try to
>get as more understanding as possible. The rest must come with experience and
>experiments..
>
>sincerely Olek
>
>>
>> -mukul
___________________________________________________________________________
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