You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by lev <lt...@brandsoft.com> on 2002/05/21 18:57:41 UTC

cookie problem

I am trying to set cookie from inside the action code in a site map.

Here is a snippet of my code:

    Response response = (Response)
objectModel.get(Constants.RESPONSE_OBJECT);
    Cookie cookie = response.createCookie("user","Jhon Doe");
    cookie.setMaxAge(1000000);
    response.addCookie(cookie);

But apparently this code doesn't work. I couldn't detect appropriate cookie
using IE. Did I do something wrong ?
BTW I use cocoon v. 2.0.1.

Thank you
Lev Tsentsiper


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


RE: cookie problem

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: lev [mailto:ltsentsiper@brandsoft.com]
> 
> I am trying to set cookie from inside the action code in a site map.
> 
> Here is a snippet of my code:
> 
>     Response response = (Response)
> objectModel.get(Constants.RESPONSE_OBJECT);
>     Cookie cookie = response.createCookie("user","Jhon Doe");
>     cookie.setMaxAge(1000000);

      cookie.setPath("/");
      cookieToSet.setVersion(0);

>     response.addCookie(cookie);


Vadim

 
> But apparently this code doesn't work. I couldn't detect appropriate
cookie
> using IE. Did I do something wrong ?
> BTW I use cocoon v. 2.0.1.
> 
> Thank you
> Lev Tsentsiper
 


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>