Return-Path: Delivered-To: apmail-cocoon-docs-archive@www.apache.org Received: (qmail 38552 invoked from network); 7 Jun 2007 17:05:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Jun 2007 17:05:26 -0000 Received: (qmail 21262 invoked by uid 500); 7 Jun 2007 16:52:28 -0000 Delivered-To: apmail-cocoon-docs-archive@cocoon.apache.org Received: (qmail 21242 invoked by uid 500); 7 Jun 2007 16:52:28 -0000 Mailing-List: contact docs-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: docs@cocoon.apache.org List-Id: Delivered-To: mailing list docs@cocoon.apache.org Received: (qmail 21230 invoked by uid 99); 7 Jun 2007 16:52:28 -0000 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.67] (HELO cocoon.zones.apache.org) (140.211.11.67) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jun 2007 09:52:27 -0700 Message-ID: <16296460.1181235124027.JavaMail.daisy@cocoon.zones.apache.org> Date: Thu, 7 Jun 2007 16:52:04 +0000 (GMT+00:00) From: daisy@cocoon.zones.apache.org To: docs@cocoon.apache.org Subject: [DAISY] Created: Response Object Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org A new document has been created. http://cocoon.zones.apache.org/daisy/documentation/1384.html Document ID: 1384 Branch: main Language: default Name: Response Object Document Type: Cocoon Document Created: 6/7/07 4:52:00 PM Creator (owner): Reinhard P=C3=B6tz State: publish Parts =3D=3D=3D=3D=3D Content ------- Mime type: text/xml Size: 4191 bytes Content:

The Response object represents the Cocoon response associated w= ith the current request.

The response object contains hooks only to the cookies and to the respon= se headers. Everything else will be controlled by the rest of the cocoon pipel= ine machinery (like output encoding, for example, which should *NOT* be determi= ned by the flow).

It provides the following functions and properties:

createCookie

Function [Cookie] createCookie([String] name, [String] value)

Creates a new Cookie.

addCookie

Function addCookie([Cookie] cookie)

Adds cookie to the current response.

containsHeader

Function [Boolean] containsHeader([String] name)

Returns whether the current response contains a header with the specifie= d name.

setHeader

Function setHeader([String] name, [String] value)

Replaces the value of the header with name with value.=

addHeader

Function addHeader([String] name, [String] value)

Creates a new header in the current response with the specified name= and value.

setStatus

Function setStatus([Number] sc)

Sets the status code for this response.

Session Object

The Session object represents the user session associated with = the current Cocoon request.

It provides the following functions and properties:

getAttribute

Function [Object] getAttribute([String] name)

Get the value of the session attribute with the specified name.=

setAttribute

Function setAttribute([String] name, [Object] value)

Set the value of the session attribute with the specified name = to value.

removeAttribute

Function removeAttribute([String] name)

Remove the session attribute with the specified name.

invalidate

Function invalidate()

Invalidate this session, releasing all resources associated with it.

isNew

Function [Boolean] isNew()

Returns true if the client does not yet know about the session = or if the client chooses not to join the session. For example, if the server used= only cookie-based sessions, and the client had disabled the use of cookies, then= a session would be new on each request.

getId

Function [String] getId()

Returns the unique id associated with this session.

getCreationTime

Function [Number] getCreationTime()

Returns the time when this session was created, measured in milliseconds since midnight January 1, 1970 GMT.

getLastAccessedTime

Function [Number] getLastAccessedTime()

Returns the last time the client sent a request associated with this ses= sion, as the number of milliseconds since midnight January 1, 1970 GMT.

setMaxInactiveInterval

Function setMaxInactiveInterval([Number] interval)

Specifies the time, in seconds, between client requests before the contextcontainer will invalidate this session. A negative time indicates th= e session should never timeout.

getMaxInactiveInterval

Function [Number] getMaxInactiveInterval()

Returns the maximum time interval, in seconds, that the context containe= r will keep this session open between client accesses. After this interval, t= he context container will invalidate the session. The maximum time interval ca= n be set with the setMaxInactiveInterval method. A negative time indica= tes the session should never timeout.

Properties

Session properties map to session attributes, i.e. session.blah is equivalent to session.getAttribute("blah").

Collections =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The document belongs to the following collections: cdocs-flowscript