About
Application Express is built upon PL/SQL Web Toolkit.
Articles Related
Management
File
As a convenience, the PL/SQL Web Toolkit is included normally with Application Express in the apex/owa directory.
Version
select owa_util.get_version from dual;
Support
ORA-6502 - OWA_UTIL.get_cgi_env
When calling the OWA_UTIL.get_cgi_env function outside a web server context (ie in the database), you will get the following errors.
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "SYS.OWA_UTIL", line 356
06502. 00000 - "PL/SQL: numeric or value error%s
This is because the environment list is not initialized. The below code will work.
SET SERVEROUTPUT ON;
DECLARE
l_env VARCHAR2 ( 400 ) := 'No set';
l_nm owa.vc_arr;
l_vl owa.vc_arr;
BEGIN
owa.init_cgi_env( l_nm.count, l_nm, l_vl );
BEGIN
SELECT OWA_UTIL.get_cgi_env ( 'REQUEST_PROTOCOL' ) INTO l_env FROM dual;
EXCEPTION
WHEN VALUE_ERROR THEN
DBMS_OUTPUT.PUT_LINE ( 'ORA-6502: Is de Cgi env geinitializeerd ?' ) ;
END;
DBMS_OUTPUT.PUT_LINE ( 'The request protocol is (' || nvL(l_env,'NULL') || ')' ) ;
END;