Oracle OWA_COOKIE
Version 12.1.0.2

General Information
Library Note Morgan's Library Page Footer
The Library is currently in the process of being upgraded from Oracle Database Version 11.2.0.3 to 12.1.0.1. Demos are being upgraded to reflect the new Container paradigm as well as EBR (Edition Based Redefinition) and may contain references to CDBs, PDBs, and other objects you may not be familiar with such as CDB_OBJECTS_AE: Welcome to 12c.
Purpose Wrapper for calls to put or get an HTTP_COOKIE
AUTHID DEFINER
Data Types TYPE vc_arr IS TABLE OF VARCHAR2(4096) INDEX BY BINARY_INTEGER;

TYPE cookie IS RECORD (
name     VARCHAR2(4096),
vals     vc_arr,
num_vals INTEGER);
Dependencies
HTP WWV_FLOW_ASFCOOKIE WWV_FLOW_F4000_PLUGINS
OWA_CUSTOM WWV_FLOW_AUTHENTICATION WWV_FLOW_LANG
OWA_CX WWV_FLOW_AUTHENTICATION_API WWV_FLOW_SESSION
OWA_UTIL WWV_FLOW_DEBUG WWV_FLOW_UTILITIES
Documented No
First Available 8.1.7
Security Model Owned by SYS with EXECUTE granted to PUBLIC and the APEX_040200 role
Source {ORACLE_HOME}/rdbms/admin/pubcook.sql
Subprograms
 
GET
Returns the value for the specified cookie owa_cookie.get(name IN VARCHAR2) RETURN cookie;
DECLARE
 ourcookie owa_cookie.cookie;
BEGIN
  ourCookie := owa_cookie.get('UWCOOKIE');
END;
/
 
GET_ALL
Returns an array of name-value pairs of all HTTP Cookies sent from the browser owa_cookie.get_all(
names    OUT vc_arr,
vals     OUT vc_arr,
num_vals OUT INTEGER);
set serveroutput on

DECLARE
 name_arr owa_cookie.vc_arr;
 vals_arr owa_cookie.vc_arr;
 vals_ret INTEGER;
BEGIN
  owa_cookie.get_all(name_arr, vals_arr, vals_ret);
  dbms_output.put_line(vals_ret);
END;
/
 
INIT
Initializes package variables owa_cookie.init;
exec owa_cookie.init;
 
REMOVE
Forces the expiration of an existing cookie owa_cookie.remove(
name IN VARCHAR2,
val  IN VARCHAR2,
path IN VARCHAR2 DEFAULT NULL);
exec owa_cookie.remove('UWCOOKIE', '1');
 
SEND
Generates an HTTP header line in the form:
Set-Cookie: <name>=<value> expires=<expires> path=<path>
domain=<domain> [secure]
owa_cookie.send(
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);
BEGIN
  owa_util.mime_header('text/html', FALSE);
  owa_cookie.send('UWCOOKIE','Oracle', SYSDATE+30);
END;
/

Related Topics
OWA
OWA_CUSTOM
OWA_CX
OWA_OPT_LOCK
OWA_SEC
OWA_TEXT
OWA_UTIL
Packages

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2014 Daniel A. Morgan All Rights Reserved