You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Ed Wolpert <wo...@radiancegroup.com> on 2000/01/10 22:45:54 UTC

Cookies and Cocoon 1.6 and beyond

Folks-

  Anyone know when cookies will be useable in the cocoon framework?
(Cookies require the HttpServletResponse, which is not accessible by
the Producers.) If they are not available in Cocoon 1.6, will it be 
available to use by 2.0? Thanks.


Edward Wolpert
Radiance Group 

Re: Cookies and Cocoon 1.6 and beyond

Posted by Stefano Mazzocchi <st...@apache.org>.
Ed Wolpert wrote:
> 
> Folks-
> 
>   Anyone know when cookies will be useable in the cocoon framework?
> (Cookies require the HttpServletResponse, which is not accessible by
> the Producers.) If they are not available in Cocoon 1.6, will it be
> available to use by 2.0? Thanks.

Well, kinda dirty, I know, but the response "is" available. :) but only
to processors.

  public Document process(Document document, Dictionary parameters)
    throws Exception
  {
    HttpServletRequest request =
      (HttpServletRequest) parameters.get("request");

    HttpServletResponse response =
      (HttpServletResponse) parameters.get("response");

I know it should be available to everyone, with output only available to
formatters, but for now, this is a hack that allows you to do something.

We have scheduled something better for future versions... (anyway
proposals are welcome)


-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------



RE: Cookies and Cocoon 1.6 and beyond

Posted by Ricardo Rocha <ri...@apache.org>.
>   Anyone know when cookies will be useable in the cocoon framework?
> (Cookies require the HttpServletResponse, which is not accessible by
> the Producers.) If they are not available in Cocoon 1.6, will it be 
> available to use by 2.0? Thanks.

Cookies and the HttpServletResponse (except, yes, ServletOutputStream)
are available to XSP, like in:

   <response:add-cookie>
      <cookie:create name="xyz">
        <cookie:value><xsp:expr>
          xyz.getValue()
        </xsp:expr></cookie:value>
      </cookie:create>
   </response:add-cookie>