You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Andy Lewis <an...@veritas.com> on 2000/08/11 17:36:03 UTC

Cookies in Cocoon 1.7...

Does any one know how do I would go about setting a cookie from within a
custom producer in Cocoon 1.7.4? I don't appear to have access to the
response object.




Re: Cookies in Cocoon 1.7...

Posted by Andy Lewis <an...@veritas.com>.
That did it....thanks!


"Marcelo F. Ochoa" wrote:

> Andy Lewis wrote:
>
> > Does any one know how do I would go about setting a cookie from within a
> > custom producer in Cocoon 1.7.4? I don't appear to have access to the
> > response object.
>
>    Search for the thread "XSP and Redirect(RequestDispatcher)" in
> cocoon-user list to find a HeaderProcessor class.   This class is part of
> DB Prism (http://www.plenix.com/dbprism/). This class permit set cookies,
> redirect and any processes that change the request object.
>    Here an example of PI definitions for cookies:
>
> <?xml version="1.0"?>
> <?xml-stylesheet href="http://localhost/xsl/hello.xsl" type="text/xsl"?>
> <?cocoon-process type="http"?>
> <?http mode="Set-Cookie" spec="test=1; expires=Fri Aug-11-00 23:10:40 GMT;"
> ?>
> <?cocoon-process type="xslt"?>
> <page>
> <title>Hello world</title>
> <content>
> <paragraph>This is my first Prism-Cocoon code with Cookies!</paragraph>
> </content>
> </page>
> <!-- toolkit version 1.0.1 Author: Marcelo F. Ochoa "mochoa@ieee.org" -->
>
>    Best reagards, Marcelo.


Re: Cookies in Cocoon 1.7...

Posted by "Marcelo F. Ochoa" <mo...@ieee.org>.
Andy Lewis wrote:

> Does any one know how do I would go about setting a cookie from within a
> custom producer in Cocoon 1.7.4? I don't appear to have access to the
> response object.

   Search for the thread "XSP and Redirect(RequestDispatcher)" in
cocoon-user list to find a HeaderProcessor class.   This class is part of
DB Prism (http://www.plenix.com/dbprism/). This class permit set cookies,
redirect and any processes that change the request object.
   Here an example of PI definitions for cookies:

<?xml version="1.0"?>
<?xml-stylesheet href="http://localhost/xsl/hello.xsl" type="text/xsl"?>
<?cocoon-process type="http"?>
<?http mode="Set-Cookie" spec="test=1; expires=Fri Aug-11-00 23:10:40 GMT;"
?>
<?cocoon-process type="xslt"?>
<page>
<title>Hello world</title>
<content>
<paragraph>This is my first Prism-Cocoon code with Cookies!</paragraph>
</content>
</page>
<!-- toolkit version 1.0.1 Author: Marcelo F. Ochoa "mochoa@ieee.org" -->

   Best reagards, Marcelo.