Table of Contents

About

The format of the APEX URL and URL management.

Syntax

http://pocserver01:7777/pls/apex/f?p=103:2:1451367446716618:UPDATE:YES::P2_MDM_SOURCE_SYSTEM_ID,P2_VENDOR_ID:SAP7:DEC-001

Where:

  • pocserver01:7777 is the URL of the server.
  • pls is the indicator to use the mod_plsql cartridge.
  • apex is the database access descriptor (DAD) name. The DAD describes how Oracle HTTP Server connects to the database server so that it can fulfill an HTTP request. The default value is apex.
  • f?p= is a prefix used by Oracle Application Express.
  • 103 is the application id (or the application alias) being called
  • 2 is the page id or page alias to be displayed.
  • 1451367446716618 is the session id.
  • UPDATE is the request
  • Yes is the debug level
  • P2_MDM_SOURCE_SYSTEM_ID,P2_VENDOR_ID are two fields in our form
  • SAP7:DEC-001 are the value of two above fields.

To run this example application, we would use the URL:

http://pocserver01:7777/pls/apex/f?p=103:2:::::P2_MDM_SOURCE_SYSTEM_ID,P2_VENDOR_ID:SAP4,DEC-001

When users log in, they receive unique session numbers.

Function

Prepare

See: apex_util.prepare_url

Redirect

The REDIRECT_URL Procedure calls owa_util.redirect_url to tell the browser to redirect to a new URL. Afterwards, it automatically calls apex_application.stop_apex_engine to abort further processing of the Application Express application.

owa_util.redirect_url('http://apex.oracle.com');
apex_application.stop_apex_engine;

where:

Encode

APEX_UTIL.URL_ENCODE Function

GetUrl

Return the server URL where a PL/SQL script is called. (Thanks to bas)

This can only been used in a web server (ie in APEX en not in the database).

function GetApexUrl return varchar2
is
begin
    return OWA_UTIL.get_cgi_env ('REQUEST_PROTOCOL') || '://'
        || OWA_UTIL.get_cgi_env ('HTTP_HOST')
        || OWA_UTIL.get_cgi_env ('SCRIPT_NAME')      || '/f?p=';

end GetApexUrl;

See: Oracle Apex - OWA (PL/SQL Web Tool Kit)

Documentation / Reference