[Zope] Re: Setting a Cookie

Nico Grubert nico@beehive.de
Mon, 21 May 2001 15:53:09 +0100


i realized you missed the attribute axpires=' .... ' !?

this works fine for me:

<dtml-call "RESPONSE.setCookie('language', 'english', expires='Wed, 28
Feb 2009 19:00:00 GMT')"> 


cheers,
nico

----------------------------------------------------------------
nico grubert  (education & publishing)    nico@beehive.de
beehive elektronische medien GmbH         http://www.beehive.de
phone: +49 30 847-82 0                    fax: +49 30 847-82 299

> Now I remember this problem when I worked with ASP. It turns out that
> you had to set an expire date also (although they said that if you
> didn't, the cookie expires when you close the browser and nothing gets
> written to the client machine.) That would be good - IF ONLY I COULD
> ACCESS THE INFORMATION I SET.
>
> Sorry 'bout that. But it's fustrating to see this problem come up again
> with another language.
>
> So I set an expire date. But, get this, now it fails when the page is
> loaded. The error message says that the method expected three
> parameters, but received four. Do you see four parameters here?
>
> <dtml-call "RESPONSE.setCookie('CookieMonster', '458468', 'Sunday 20-05-
> 2001 12:00:00 GMT')">
>
> I initially had a comma between Wdy, Date - because that is the
> DOCUMENTED syntax, but this seems incorrect also.
>
> Here's the error message:
>
> Error Type: TypeError
> Error Value: too many arguments; expected 3, got 4
>
> Any suggestions? Proven code would be appreciated.
>
> Thanks in advance,
> Tommy