xsp add cookie to response

View: New views
1 Messages — Rating Filter:   Alert me  

xsp add cookie to response

by ballygowen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm trying to send a cookie in a response using xsp but it's not working for me.  I've tried using within xsp:logic

org.apache.cocoon.environment.http.HttpCookie c = new org.apache.cocoon.environment.http.HttpCookie("thisuser", user);
response.addCookie(c);

and also tried
<xsp-response:add-cookie><xsp:expr>c</xsp:expr></xsp-response:add-cookie>

and have added lines in the xsp:page

               xmlns:xsp-cookie="http://apache.org/xsp/cookie/2.0"
               xmlns:xsp-response="http://apache.org/xsp/response/2.0"

However when I look at the contents of the response I don't see the cookie appearing when using <xsp-cookie:getCookies as="xml">

Could someone direct me to a solution please,

Thanks in advance

Frank