there is two types can be used for OWA_COOKIE
- type vc_arr is table of varchar2(4000) index by binary_integer.
- type cookie is record (name varchar2(4000),vals vc_arr,num_vals integer);
- Open Header
- Send Cookie
- Close Header
- Redirect to another page.
don't forget to close the header.
if for some reason you find the cookie value printed into the screen then your document header maybe was opened and closed before your cookie code.
BEGIN
OWA_UTIL.MIME_HEADER ('text/html', FALSE);
OWA_COOKIE.SEND (NAME => 'REGIND',VALUE => TWBKBSSF.F_ENCODE ('N'));
OWA_UTIL.HTTP_HEADER_CLOSE;
OWA_UTIL.REDIRECT_URL ('xwskstrg.P_RegsAddCrse');
END;
make sure that you encrypt the value of the cookie if it will contain a sensitive data.
OWA_UTIL.MIME_HEADER ('text/html', FALSE);
OWA_COOKIE.SEND (NAME => 'REGIND',VALUE => TWBKBSSF.F_ENCODE ('N'));
OWA_UTIL.HTTP_HEADER_CLOSE;
OWA_UTIL.REDIRECT_URL ('xwskstrg.P_RegsAddCrse');
END;