A About the Configuration File

The section describes the Oracle Application Express Listener configuration file.

Topics:

About the Listener Configuration File

The Oracle Application Express Listener Administration creates and updates a configuration file, named apex-config.xml. This file is an XML file that conforms to the Java Properties policy. You can create or edit this file manually.

Topics:

Locating the Configuration File

To determine the location of the apex-config.xml:

  1. Go to the web.xml file:

     /<application server directory>/apex/WEB-INF/web.xml
    
  2. Locate the web.xml initialization parameter, config.dir.

    This parameter specifies the location of the configuration file.

How the Listener Searches for the Configuration File

The Oracle Application Express Listener searches for the apex-config.xml configuration file at the following locations and in the following sequence:

  1. ${config.dir}/<Mount-Point>/apex-config.xml (from web.xml, if specified)

  2. ${config.dir}/apex-config.xml (from web.xml, if specified)

  3. ${user.home}/<Mount-Point>/apex-config.xml.

  4. ${java.io.tmpdir}/<Mount-Point>/apex-config.xml (default for new installs)

  5. $HOME/apex-config.xml

  6. ${java.io.tmpdir}/apex/apex-config.xml (default for new installs)

If no existing apex-config.xml is found in any of the above locations, then a new apex-config.xml is created and stored as follows:

  • If a config.dir value was specified in web.xml, then apex-config.xml is stored in $config.dir/<Mount-Point>. If the folder does not exist, then it is created.

  • Otherwise, if a folder named ${user.home}/<Mount-Point> exists, then apex-config.xml is stored in there.

  • Otherwise, apex-config.xml is created in the default location ${java.io.tmpdir}/<Mount-Point>/apex-config.xml

Where:

  • ${config.dir} is the initialization parameter named config.dir in the Oracle Application Express Listener web.xml file.

  • <Mount-Point> is the Context Path at which Oracle Application Express Listener is deployed on the application server. Note if the application is deployed in the default context path ('/'), then <Mount-Point> defaults to a value of apex.

  • ${user.home} is the value of the Java System Property named user.home.

  • ${java.io.tmpdir} is the value the Java System Property named: java.io.tmpdir.

Setting the Value of the config.dir Parameter

The config.dir parameter specifies the location of the web.xml configuration file.

To specify the value of the config.dir parameter:

  1. Unzip apex.war into a temporary folder.

  2. Edit the WEB-INF/web.xml file.

  3. Remove the comment markers (<!--, -->) around the <init-param> for config.dir.

  4. Edit the value of the <param-value> element to point to the location where you created apex-config.xml.

  5. Rezip the modified files into a new apex.war file.

  6. Deploy the modified apex.war file.

Note that some application servers unzip the apex.war file into a folder after deploying the application. In that case, navigate to the unpacked version of web.xml created by the application server and edit it directly. After editing the file, restart the application server.

Understanding Configuration File Parameters

Each entry in the apex-config.xml contains a key and a corresponding value. The following is an example of an XML file document containing the declaration, entry key and value format:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
 <entry key="key.name">value</entry>
 <entry key="key.name">value</entry>
. . .
 <entry key="key.name">value</entry>
</properties>

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<comment> Created: Tue Apr 27 03:00:39 PDT 2010 Version: 0.10.111.13.51 </comment>

<entry key="apex.db.username">APEX_PUBLIC_USER</entry>
<entry key="apex.db.password">@05D783103A9583BF206ABCA52F7D2E850B</entry>
<entry key="apex.db.connectionType">basic</entry>
<entry key="apex.db.hostname">localhost</entry>
<entry key="apex.db.port">1521</entry>
<entry key="apex.db.sid">ora111</entry>
<entry key="apex.db.servicename"></entry>
<entry key="apex.db.tnsAliasName">MY_TNSALIAS</entry>
<entry key="apex.db.tnsDirectory">C:\ORACLE\NETWORK\ADMIN</entry>
<entry key="apex.db.customURL"> jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP) (HOST=myhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ora111.us.oracle.com)))</entry>
<entry key="apex.jdbc.DriverType">thin</entry>
<entry key="apex.jdbc.InitialLimit">3</entry>
<entry key="apex.jdbc.MinLimit">1</entry>
<entry key="apex.jdbc.MaxLimit">10</entry>
<entry key="apex.jdbc.MaxStatementsLimit">10</entry>
<entry key="apex.jdbc.InactivityTimeout">1800</entry>
<entry key="apex.jdbc.AbandonedConnectionTimeout">900</entry>
<entry key="apex.security.inclusionList">apex, p, v, f, wwv_*, apple, y*, c*</entry>
<entry key="apex.security.exclusionList">customer_account,bank*, employe?</entry>
<entry key="apex.security.disableDefaultExclusionList">false</entry>
<entry key="apex.security.requestValidationFunction">CHECK_VALID_PROCEDURE</entry>
<entry key="apex.security.maxEntries">2000</entry>
<entry key="apex.cache.caching">true</entry>
<entry key="apex.cache.procedureNameList">p,download_file</entry>
<entry key="apex.cache.type">lru</entry>
<entry key="apex.cache.maxEntries">500</entry>
<entry key="apex.cache.expiration">7</entry>
<entry key="apex.cache.duration">days</entry>
<entry key="apex.cache.monitorInterval">60</entry>
<entry key="apex.cache.directory">C:\data\cachefiles</entry>
<entry key="apex.procedure.preProcess">SCOTT.PREPROC1, INITIALIZE, PKG1.PROC</entry>
<entry key="apex.procedure.postProcess">SCHEMA1.SUBMIT.REQUEST,FINISHTASK</entry>
<entry key="apex.misc.defaultPage">apex</entry>
<entry key="apex.debug.debugger">false</entry>
<entry key="apex.debug.printDebugToScreen">false</entry>
<entry key="apex.error.keepErrorMessages">true</entry>
<entry key="apex.error.maxEntries">50</entry>
<entry key="apex.log.logging">true</entry>
<entry key="apex.log.maxEntries">50</entry>
</properties>

About Configurable Parameters

Table A-1 lists editable parameters in the apex-config.xml configuration file.

Table A-1 Oracle Application Express Listener Configuration File Parameters

Key Type Description Example

apex.cache.caching

boolean

Supported values:

  • true

  • false (default)

For caching to be enabled, this must be set to true and the procedureNameList must have a procedure.

true

apex.cache.directory

string

The directory location for the cache files.

C:\data\cachefiles

apex.cache.duration

string

Supported values:

  • days (default)

  • minutes

  • hours

Required for expire cache type.

days

apex.cache.expiration

numeric

Required for expire cache type.

Defaults to 7.

7

apex.cache.maxEntries

numeric

Required for lru cache type.

Defaults to 500.

500

apex.cache.monitorInterval

numeric

Interval time is specified in minutes.

If the cache type is expire, Oracle Application Express Listener will check the cache every NN minutes for files that have expired. For example, if the monitorInterval is 60, then it will check the cache every 60 minutes.

Defaults to 60.

60

apex.cache.procedureNameList

string

Specify the procedure names to allow for caching of their files.

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

Each procedure name must be separated by a comma.

p, download_file

apex.cache.type

string

Supported values:

  • expire

  • iru (default)

iru

apex.db.connectionType

string

The type of connection. Supported values:

  • basic

  • tns

  • advanced

basic

apex.db.customURL

string

The JDBC URL connection to connect to the database.

jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP) (HOST=myhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ora111.us.example.com)))

apex.db.hostname

string

The host system for the Oracle database.

myhostname

apex.db.password

string

The password of the specified database user. Include an exclamation at the beginning of the password so that it can be stored encrypted.

!password4user

apex.db.port

numeric

The database listener port.

1521

apex.db.servicename

string

The network service name of the database.

ora111.example.com

apex.db.sid

string

The name of the database.

ora111

apex.db.tnsAliasName

string

The TNS alias name that matches the name in the tnsnames.ora file.

MY_TNSALIAS

apex.db.tnsDirectory

string

The directory location of your tnsnames.ora file.

C:\ORACLE\NETWORK\ADMIN

apex.db.username

string

The name of the database user for the connection.

APEX_PUBLIC_USER

apex.debug.debugger

boolean

Indicate whether to display debugging messages on the application server console.

Supported values:

  • true

  • false (default)

false

apex.debug.printDebugToScreen

boolean

Indicate whether to display error messages on the browser.

Supported values:

  • true

  • false (default)

false

apex.error.keepErrorMessages

boolean

Indicate whether to retain the error messages.

Supported values:

  • true

  • false (default)

true

apex.error.maxEntries

numeric

Specify the total number of error messages to retain.

Defaults to 50.

50

apex.jdbc.AbandonedConnectionTimeout

numeric

Specify how long a borrowed (in use) connection can remain unused before it is considered as abandoned and reclaimed. The abandoned connection timeout is in seconds.

Defaults to 900.

900

apex.jdbc.DriverType

string

The JDBC driver type. Supported values:

  • thin

  • oci8

thin

apex.jdbc.InactivityTimeout

numeric

Specify how long an available connection can remain idle before it is closed. The inactivity connection timeout is in seconds.

Defaults to 1800.

1800

apex.jdbc.InitialLimit

numeric

Specify the initial size for the number of connections that will be created.

Defaults to 3

3

apex.jdbc.MaxLimit

numeric

Specify the maximum number of connections.

Defaults to 10

10

apex.jdbc.MaxStatementsLimit

numeric

Specify the maximum number of statements to cache for each connection.

Defaults to 10.

10

apex.jdbc.MinLimit

numeric

Specify the minimum number of connections.

Defaults to 1.

1

apex.log.logging

boolean

Indicate whether to retain the log messages.

Supported values:

  • true

  • false (default)

true

apex.log.maxEntries

numeric

Specify the total number of log messages to retain.

Defaults to 50.

50

apex.misc.defaultPage

string

The default page to display. The Oracle Application Express home page, apex, is commonly used.

apex

apex.procedure.postProcess

string

Specify the procedure name(s) to execute after executing the procedure specified on the URL. Multiple procedure names must be separated by commas.

SCHEMA1.SUBMIT.REQUEST,FINISHTASK

apex.procedure.preProcess

string

Specify the procedure name(s) to execute prior to executing the procedure specified on the URL. Multiple procedure names must be separated by commas.

SCOTT.PREPROC1, INITIALIZE, PKG1.PROC

apex.security.disableDefaultExclusionList

boolean

Supported values:

  • true

  • false (default)

false

apex.security.exclusionList

string

Specify a pattern for procedures, packages, or schema names which are forbidden to be directly executed from a browser.

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

Note: Separate multiple patterns using commas.

customer_account,bank*, employe?

apex.security.inclusionList

string

Specify a pattern for procedures, packages, or schema names which are allowed to be directly executed from a browser.

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

Note: Separate multiple patterns using commas.

apex, p, v, f, wwv_*, y*, c*

apex.security.maxEntries

numeric

Specify the maximum cache size.

Defaults to 2000.

2000

apex.security.requestValidationFunction

string

Specify a validation function to determine if the requested procedure in the URL should be allowed or disallowed for processing. The function should return true if the procedure is allowed; otherwise, return false.

CHECK_VALID_PROCEDURE