Skip Headers
Oracle® Application Express Listener Installation and Developer Guide
Release 1.1

Part Number E21058-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF · Mobipocket

2 Configuring Oracle Application Express Listener

This section explains how to use Oracle Application Express Listener Administration to configure Oracle Application Express Listener. It describes how to set up a database connection, configure security, define file caching, create pre and post processing procedures, and perform other tasks.

Topics:

Accessing Oracle Application Express Listener

Oracle Application Express Listener Administration enables you to configure Oracle Application Express Listener. Note that some of the URLs listed in the section require the user have a specified role. To learn more, see the section for creating users and roles for your application server in "Installing Oracle Application Express Listener".

Topics:

Access Oracle Application Express Listener Administration

To access Oracle Application Express Listener Administration initially, enter the following URL in your Web browser:

http://<host>:<port>/apex/listenerConfigure

Once you have completed the configuration process, use the following URL to access Oracle Application Express Listener Administration:

  1. In your Web browser, enter the following URL:

    http://<host>:<port>/apex/listenerAdmin
    
  2. When prompted, enter your credentials.

    Note that in order to log in using this URL, a user must have the Admin role.

View Status Information

You can view Oracle Application Express Listener Status information, by entering the following URL in your Web browser:

http://<host>:<port>/apex/listenerStatus

Note that in order to log in using this URL, a user must have the Manager role.

About Oracle Application Express Listener Administration

This section describes the Oracle Application Express Listener Administration user interface which is separated into six categories:

Tip:

Every category (or tab) has an Apply button. Every time you click Apply, Oracle Application Express Listener Administration saves the information and returns you to the defined default Web page. If you need to update information on multiple tabs, make all your updates and then click Apply.

Establishing a Database Connection

Use the Connection tab to enter database credentials. Key elements of this page include:

Note that Username, Connection Type, Port, and SID contain default values.

Topics:

Establish a Basic Connection

To configure a basic database connection:

  1. Click the Connection tab.

  2. For Username, enter the name of the database user for the connection.

  3. For Password, enter the password of the specified database user.

  4. For Connection Type, select Basic.

  5. Specify the following:

    1. Hostname - Enter host system for the Oracle database.

    2. Port - Enter the database listener port.

  6. Select one of the following:

    • SID - Enter the name of the database.

    • Service name - Network service name of the database.

  7. Click Apply.

Establish a TNS Connection

To configure a TNS database connection:

  1. Click the Connection tab.

  2. For Username, enter the name of the database user for the connection.

  3. For Password, enter the password of the specified database user.

  4. For Connection Type, select TNS.

  5. Specify the following:

    1. TNS Alias Name - The TNS alias name must match the name in the tnsnames.ora file.

    2. TNS Directory - The directory location of your tnsnames.ora file.

    If you define the environment variables TNS_ADMIN or ORACLE_HOME, then the listener checks if the file, tnsnames.ora, exists in either the TNS_ADMIN directory or [ORACLE_HOME]/NETWORK/ADMIN directory. If the file exists, then the TNS Directory will contain the default directory location. Otherwise, the user required to specify the TNS Directory.

  6. Click Apply.

Establish an Advanced Connection

You can specify a custom JDBC URL to connect to the database by selecting the Connection Type, Advanced on the Connection tab.

To configure an Advanced database connection:

  1. Click the Connection tab.

  2. For Username, enter the name of the database user for the connection.

  3. For Password, enter the password of the specified database user.

  4. For Connection Type, select Advanced.

    The Custom JDBC URL field displays.

  5. In Custom JDBC URL, enter a custom URL.

    You can specify different formats for the custom JDBC URL. Consider the following examples:

    • SID:

      jdbc:oracle:thin:<host>:<port>:<sid>
      

      Example:

      jdbc:oracle:thin:myhost:1521:orcl
      jdbc:oracle:oci8:myhost:1521:orcl
      
      
    • Service name:

      jdbc:oracle:thin:@//<host>:<port>/<servicename>
      

      Example:

      jdbc:oracle:thin:@//myhost:1521/orcl.us.oracle.com
      
      
    • Oracle Net keyword-value pair:

      jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=myservicename.com)))
      
  6. Click Apply.

See Also:

Oracle Database Net Services Administrator's Guide for more information about connection formats.

About JDBC Settings

Use the JDBC Settings section of the Connection tab to configure JDBC option.

To configure JDBC settings:

  1. Click the Connection tab.

  2. For Username, enter the name of the database user for the connection.

  3. For Password, enter the password of the specified database user.

  4. For Connection Type, select a connection type.

  5. To expand the JDBC Settings heading, click JDBC Settings.

  6. Specify the following:

    • JDBC Driver Type - Select either thin or oci8.

    • Initial Pool Size - Specify the initial pool size for the number of connections that will be created.

    • Minimum Connections - Define the minimum number of connections.

    • Maximum Connections - Specify the maximum number of connections.

    • Maximum Statements - Define the maximum number of statements to cache for each connection.

    • Inactivity Timeout - Indicate how long (in seconds) an available connection can remain idle before it is closed.

    • Abandoned Connection Timeout - Determine how long a borrowed (in use) connection can remain unused (in seconds) before it is considered as abandoned and reclaimed.

  7. Click Apply.

Tip:

Except for the JDBC Driver type, JDBC options can also be changed during run time

Configuring Security

Use the Security tab to validate procedure requests and determine if a user is allowed to access the procedure. Click each section heading to expose the content.

Topics:

About Allowed Procedures

Use Allowed Procedures to specify procedures, packages, or schema names that can be executed from the Web browser.

To specify Allowed Procedures:

  1. Click the Security tab.

  2. Click Allowed Procedures to expand or hide the content.

  3. In Inclusion list, enter the procedure name or procedure patterns separated by commas.

    Description of sec_allpw_proc.gif follows
    Description of the illustration sec_allpw_proc.gif

    Note that the wildcard characters asterisk (*) and question mark (?) are supported. Use an asterisk (*) to substitute zero or more characters and a question mark (?) to substitute for any one character.

    If the Inclusion list field is left blank, then the Oracle Application Express Listener does not validate the procedure names to determine if the procedure is allowed for processing.

  4. Click Apply.

Tip:

The advantage of using Allowed Procedures is that the procedure names and procedure patterns are stored in the Oracle Application Express Listener, whereas invoking the Database Validation Function requires a database round-trip.

Advantages of Allowed Procedures

The advantage of using Allowed Procedures is that the procedure names and procedure patterns are stored in the Oracle Application Express Listener. In contrast, invoking the Database Validation Function requires a database round-trip.

About Blocked Procedures

Use Blocked Procedures to specify procedures, packages, or schema names that cannot be executed from the Web browser.

To specify Blocked Procedures:

  1. Click the Security tab.

  2. Click Blocked Procedures to expand or hide the content.

  3. In Inclusion list, enter the procedure name or procedure patterns separated by commas.

    Description of sec_block_proc.gif follows
    Description of the illustration sec_block_proc.gif

    Note that the wildcard characters asterisk (*) and question mark (?) are supported. Use an asterisk (*) to substitute zero or more characters and a question mark (?) to substitute for any one character.

    If the Exclusion list field is left blank, then the Oracle Application Express Listener does not validate the procedure names to determine if the procedure is allowed for processing.

  4. To disable this feature, select Disable Default Internal Exclusion List. See "About the Internal Exclusion List".

  5. Click Apply.

About the Internal Exclusion List

The Oracle Application Express Listener includes an internal exclusion list which blocks users from accessing the following:

sys.*, dbms_*, utl_*, owa_*, owa.*, htp.*, htf.*, wpg_docload.*

This option enables you to disable the default internal exclusion list, however, Oracle does not recommend this approach. Instead, Oracle recommends using the external exclusion list solely for debugging purposes.

Disabling the Internal Exclusion List

To disable the internal exclusion list:

  1. Click the Security tab.

  2. Click Blocked Procedures to expand the content.

  3. Select the Disable Default Internal Exclusion List check box.

  4. Click Apply.

About Database Validation Function

Use Database Validation Function to determine if the requested procedure in the URL should be allowed for processing. Oracle Application Express Listener executes the validation function you specify for each requested procedure, or checks the security cache to determine if a procedure is valid or invalid. To learn more, see "About Security Settings".

To specify a Database Validation Function:

  1. Click the Security tab.

  2. Click Database Validation Function to expand or hide the section.

  3. In the field provided, enter the name of the Database Validation Function.

    Description of sec_val_func.gif follows
    Description of the illustration sec_val_func.gif

    The validation function you specify is a stored function that resides in the database. If the validation function you specify does not exist, an error message displays.

    The validation function returns true if the procedure is allowed for processing. Otherwise, it returns false.

    If the Validation Functions field is left blank, then Oracle Application Express Listener does not validate the procedure name to determine if the procedure should be allowed for processing.

  4. Click Apply.

About the Database Validation Function Format

The validation function must return a boolean and have one argument for the procedure name. Consider the following example:

CREATE OR REPLACE
FUNCTION CHECK_VALID_PROCEDURE (Procedure_Name IN VARCHAR2) RETURN BOOLEAN AS
BEGIN
    IF (UPPER(Procedure_Name) LIKE ('CUST%')) THEN
       RETURN true;
    ELSE
       RETURN false;
    END IF;
END CHECK_VALID_PROCEDURE;

About Security Settings

When you specify a Database Validation Function, Oracle Application Express Listener uses the Security Cache to cache the procedures names and determine if they are valid or invalid. Using a caching mechanism, reduces the number of database round-trips needed to execute the above Validation Function.

To specify Security Settings:

  1. Click the Security tab.

  2. Click Security Settings to expand or hide the content.

    Description of sec_settings.gif follows
    Description of the illustration sec_settings.gif

  3. Specify the following:

    • Maximum Cache Entries - Specify the maximum cache size.

      When the maximum entries have been reached, the older (or stale) procedure name that was least recently used is removed from the cache and a new procedure name is added to the cache.

    • Total Cache Entries - Displays the total number of procedure names that are valid or invalid in the Security Cache.

    • Clear Cache - If the total cache entries is greater than zero, then the Clear Cache button displays, enabling you to delete the cache entries.

      As a best practice, clear the cache whenever a Database Validation Function is updated.

  4. Click Apply.

Understanding Security Processing

If the user enters data for Allowed Procedures, a Database Validation Function, or Blocked Procedures, the Oracle Application Express Listener determines if the entered procedure name is valid by checking the security information in the following order:

  1. Database Validation Function - Checks if the procedure name is valid.

  2. Allowed Procedures - Checks if the procedure name is in the inclusion list.

  3. Blocked Procedures - Checks if the procedure is NOT in the exclusion list.

If these validations pass, then the procedure is valid for processing.

Defining Caching

The Oracle Application Express Listener enables you to cache file-based content for quick access. Caching is only enabled if you specify the procedure names.

Topics:

Specify Procedure Names to Cache Files

To specify procedure names to allow the caching of files:

  1. Click the Caching tab.

    The Cache Files page appears.

    Description of cache_files.gif follows
    Description of the illustration cache_files.gif

  2. Specify the following:

    Option Description
    Procedure Name Specify the procedure names to allow for caching of their files.

    The procedure names can contain the wildcard characters asterisk (*) and question mark (?). Use an asterisk (*) to substitute zero or more characters and a question mark (?) to substitute for any one character

    Separate multiple procedures with a comma, for example:

    p, wwv_flow_file*, download_my_file
    
    Keep most recently used files If selected, files that are most recently used will remain in the cache.
    Maximum entries Specify the maximum number of files to cache. When the maximum entries have been reached, the older files are removed from the cache when a new file is added.
    Keep files for the specified duration If selected, files that are cached expire after the specified length of time.
    Expires after Specify the length of time after the files expire. Note the selected value must be a numeric value greater than 0.
    duration Select the amount of time from the list. Options include: days, hours, or minutes.

    Tip:

    Once you specify a Procedure Name, the Keep files for the specified duration and Keep most recently used files button are enabled.
  3. To configure Cache Settings, click Cache Settings.

    Description of cache_settings.gif follows
    Description of the illustration cache_settings.gif

    Specify the following Cache Settings options:

    1. Total Cache Entries - Displays the total number of files that are cached.

    2. Clear Cache - If the total cache entries is greater than zero, then the Clear Cache button displays, enabling you to delete the cache entries.

    3. Directory - Specify the directory location for the cache files.

  4. Click Apply.

Creating Pre- Post Processing Procedures

Click the Pre-Post Procedures tab to specify database procedures to invoke before or after executing the procedure specified on the URL.

Topics:

About Pre-processing Procedures

Click Pre-Processing to expand or hide this section. In Procedure Names, enter the procedure names to execute after executing the procedure specified on the URL and click Apply. Separate multiple procedure names with a comma.

Description of pre_process.gif follows
Description of the illustration pre_process.gif

Oracle Application Express Listener executes the procedures in the order specified in the Procedure Names field (for example, proc1, proc2, . . . , procN).

About Post-processing Procedures

Click Post-Processing to expand or hide this section. In Procedure Names, enter the procedure names to execute after executing the procedure specified on the URL and click Apply. Separate multiple procedure names with a comma.

Description of post_process.gif follows
Description of the illustration post_process.gif

Oracle Application Express Listener executes the procedures in the order specified in the Procedure Names field (for example, proc1, proc2, . . . , procN).

Viewing Status

Click the Status tab to view statistics, error tracking, and logging information.

Tip:

Users with the manager role only see the Status tab.

Topics:

About Statistics

Click Statistics to expand or hide this section.

Statistics displays the following Oracle Application Express Listener information:

  • Server uptime.

  • Total accesses, total traffic, total errors, total file downloads, and total processing time.

  • Processing time in milliseconds for minimum, average, median, and maximum.

  • Database time in milliseconds for minimum, average, median, and maximum.

  • Active requests.

  • Active and available connections in the pool.

  • Security enabled or disabled, and its cache entries and maximum entries.

  • Cache file enabled or disabled, and its cache entries and maximum entries.

Description of statistics.gif follows
Description of the illustration statistics.gif

About Error Tracking

Click Error Tracking to expand or hide recent error message. Message display in descending order. Error Tracking provides the total number of errors, date, time, and elapsed time for each error message.

About Logging

Click Logging to expand or hide the log of the different types of activities that occur in the Oracle Application Express Listener. The log includes activities such as adding a procedure to the cache, finding a procedure in the cache, or reloading a procedure. The log displays the database time and processing time in milliseconds for that procedure.

Configuring Miscellaneous Options

The Miscellaneous tab provides various configuration options, including specifying the default Web page, enabling the different types of error reporting, and whether to clear logging.

To specify options on the Miscellaneous tab:

  1. Click the Miscellaneous tab.

    The Miscellaneous tab appears.

    Description of misc.gif follows
    Description of the illustration misc.gif

  2. Specify the following options.

    Under Error Reporting:

    • Default Web Page - Specify the default page to display (for example, apex).

    • Show debug messages on console - Select this option to display debugging messages on the application server console.

    • Show error messages on browser - Select this option to display error messages on the browser.

    • Keep most recent error messages - Select this option to retain the error messages.

    • Maximum Error Entries - Specify the total number of error messages to retain.

    • Total Error Entries - If the total error entries is greater than zero, then the Clear Cache button is enabled. Click the Clear Cache button to delete the error entries.

    Under Logging:

    • Keep most recent log messages - Select this option to retain log messages.

    • Maximum Log Entries - Specify the total number of error messages to retain.

    • Total Log Entries - If the total log entries is greater than zero, then the Clear Cache button is enabled. Click the Clear Cache button to delete log entries.

  3. Click Apply.

    If the Oracle Application Express Listener detects missing data or incorrect information, then an error message displays. When saved, the data is written to the Oracle Application Express Listener configuration file and the specified default Web page appears.