[Seaside] Cookies (again?)
David Röthlisberger
davidroe at bluewin.ch
Tue May 18 23:39:38 CEST 2004
Hello,
>> For my purpose it is a little bit cumbersome to use HtmlStreamResponse to
>> set a cookie, because I have a login form, then a user clicks on the
>> 'login'-button, so the corresponding method #login is called, where I
check
>> user's nick and password and set a cookie.
>
> Agreed; I also thought about it.. I like Avi's proposal on this.
yes, this proposal would solve these login problems. :)
To have a class WACookie is also a good idea. In VisualWorks there is
already such a class, called HTTPCookie. There you have not only the
possibility to set all the attributes of a cookie, but also you have some
methods to set an expiry date, like #expireAfterDays: aNumber or
#expireImmediately and #expireNever. Really a nice to have. ;)
>> And for the moment you can only set name and value of a cookie form
Seaside,
>> but not things like expires time or domain of a cookie, or do I miss
>> something?
>> Seems so. But there is a workaround, just use something like this:
>
> html document
> cookieAt: 'name'
> put: value, '; expires=Mon, 24-May-2004 00:00:00 GMT'.
thanks. I have already done a nasty patch to the Seaside WebToolKit for VW
to achieve the same.
best regards,
David
More information about the Seaside
mailing list