Sun Java System Web Server 7.0 Update 2 Administrator's Configuration File Reference

set-cookie

The set-cookie function allows you to set a cookie in the response being sent back to the client.

Parameters

The following table describes parameters for the set-cookie function.

Table 7–64 set-cookie Parameters

Parameter 

Description 

name

Name of the cookie. 

value

(Optional) Value of the cookie. The default value is null.

path

(Optional) Base URI to which the cookie applies. The default value is / (slash).

domain

(Optional) The domain name of servers to which the cookie must be sent. If no domain is specified, web browsers send the cookie only to the server that sets the cookie. 

max-age

(Optional) Maximum time (in seconds) after which the cookie expires. If max-age is not specified, web browsers delete the cookie when the user closes the web browser.

bucket

(Optional) Common to all obj.conf functions. Adds a bucket to monitor performance. For more information, see The bucket Parameter.

Example

<If not defined $cookie{'FIRSTVISITTIME'}>
ObjectType fn="set-cookie"
           name="FIRSTVISITTIME"
           value="$time"
           max-age="31536000"
</If>