Top Previous Next TOC Index

OWA_COOKIE


OWA_COOKIE is a package that provides wrappers so that you can send cookies to and get them from the client's browser. Cookies are strings that are opaque to the client, but that maintain state throughout the client's session, or longer if an expiration date is included. Your system date will be calculated with reference to the information specified in the OWA_INIT package.


Datatypes

cookie
Since the HTTP standard is that cookie names can be overloaded, that is, multiple values can be associated with the same cookie name, this is a PL/SQL RECORD holding all values associated with a given cookie name. The fields are as follows:

name      varchar2(4K)
vals vc_arr
numvals integer

Note: vc_arr is defined in the OWA_TEXT package.


Procedures and Functions


owa_cookie.send

Syntax
owa_cookie.send(name, value, expires, path, domain, secure)

Purpose
This is a procedure that transmits a cookie to the client. This procedure must occur in the context of an OWA procedure's HTTP header output.

Parameters
name in varchar2
value in varchar2
expires in date DEFAULT NULL
path in varchar2 DEFAULT NULL
domain in varchar2 DEFAULT NULL
secure in varchar2 DEFAULT NULL

Generates
Set-Cookie: <name>=<value> expires=<expires> path=<path> domain=<domain> secure


owa_cookie.get

Syntax
owa_cookie.get(name)

Purpose
This is a function that converts the string to a cookie

Parameters
name in varchar2

Generates
A cookie


owa_cookie.get_all

Syntax
owa_cookie.get_all(names, vals, num_vals)

Purpose
This is a procedure that returns all cookie name/value pairs from the client's browser that are associated with your domain.

Parameters
names out vc_arr
vals out vc_arr
num_vals out integer

Generates
Arrays of the names and of the values in the order received, and the count of the combinations.


owa_cookie.remove

Syntax
owa_cookie.remove(name, value, path)

Purpose
This is a procedure that forces a cookie to expire immediately. This output of this procedure must be embedded in an HTML header.

Parameters
name in varchar2
value in varchar2
path in varchar2 DEFAULT NULL

Generates
Set-Cookie: <name>=<value> expires=01-JAN-1990 path=<path>


Click Here to Go to the top of the section.

Click Here to Go to the previous topic.

Click Here to Go to the next topic.

Click here to Go to the Table of Contents.

Click here to Go to the Index.


This document was last modified at 05:39pm PST on March 27, 1996.

To report any problems or comments, e-mail Oracle WebServer Documentation.