I have a problem with cookies. For example I have this code: <dtml-if "REQUEST.has_key('myCookie')"> <dtml-var myCookie> <dtml-else> <dtml-call "RESPONSE.setCookie('myCookie', _.DateTime(), expires=_.DateTime()+1)"> <dtml-if> <dtml-var getCookie> where getCookie is a simply DTML Method like this: <dtml-if "REQUEST.has_key('myCookie')"> Ok cookie <dtml-var myCookie> <dtml-else> No cookie </dtml-if> Well, the result is this "No cookie". But the cookie have just been setted. Do anybody explain me this strange behavior? Thank you, Pino _________________________________________________________________ Comunica in un Â’altra dimensione con MSN Extra Storage! http://www.msn.it/msnservizi/es/extra_storage_tag/
Pino Silvestre wrote:
I have a problem with cookies.
For example I have this code:
<dtml-if "REQUEST.has_key('myCookie')"> <dtml-var myCookie> <dtml-else> <dtml-call "RESPONSE.setCookie('myCookie', _.DateTime(), expires=_.DateTime()+1)"> <dtml-if> <dtml-var getCookie>
where getCookie is a simply DTML Method like this:
<dtml-if "REQUEST.has_key('myCookie')"> Ok cookie <dtml-var myCookie> <dtml-else> No cookie </dtml-if>
Well, the result is this "No cookie". But the cookie have just been setted. Do anybody explain me this strange behavior?
Well, the cookie isn't there, you have just told zope to send the cookie in the response. It will be visible in the next request. HTH, oliver
participants (2)
-
Oliver Bleutgen -
Pino Silvestre