Apex Listener

Embed Size (px)

DESCRIPTION

Apex Listener configuration

Citation preview

  • Oracle Application Express ListenerInstallation and Developer Guide

    Release 1.1

    E21058-01

    March 2011

  • Oracle Application Express Listener Installation and Developer Guide, Release 1.1

    E21058-01

    Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Primary Author: Terri Jennings

    Contributors: Colm Divilly, Hilary Farrell, Sharon Kennedy, Elizabeth Saunders, and Jason Straub

    This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

    The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

    If this software or related documentation is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

    U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065.

    This software is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications which may create a risk of personal injury. If you use this software in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure the safe use of this software. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software in dangerous applications.

    Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

    This software and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

  • iii

    Contents

    Preface ................................................................................................................................................................ viiTopic Overview .......................................................................................................................................... viiAudience...................................................................................................................................................... viiDocumentation Accessibility ................................................................................................................... viiiRelated Documents ................................................................................................................................... viiiConventions ................................................................................................................................................. ixThird-Party License Information............................................................................................................... ix

    1 Installing Oracle Application Express Listener About Oracle Application Express Listener........................................................................................ 1-1

    Supported Java Enterprise Edition Application Servers .............................................................. 1-1About System Requirements ................................................................................................................. 1-2Oracle Application Express Listener Installation Overview .......................................................... 1-2Downloading Oracle Application Express Listener .......................................................................... 1-2Installing in Standalone Mode .............................................................................................................. 1-3

    Install and Run in Standalone Mode............................................................................................... 1-3About Standalone Configuration Options ..................................................................................... 1-4About Stopping the Server in Standalone Mode........................................................................... 1-4About JServ Protocol (AJP) Support................................................................................................ 1-5

    Installing with Oracle WebLogic Server.............................................................................................. 1-5Download and Unzip Oracle Application Express Listener ....................................................... 1-5Create Web Archive for Oracle Application Express Images...................................................... 1-5Launch the Administration Server Console................................................................................... 1-6Install the Deployment ..................................................................................................................... 1-6Create Users and Roles...................................................................................................................... 1-9

    View Security Realms................................................................................................................. 1-9Create Users .............................................................................................................................. 1-10Create Roles .............................................................................................................................. 1-10

    Access Oracle Application Express Listener Administration................................................... 1-12Installing with Oracle GlassFish Server ........................................................................................... 1-12

    Download and Unzip Oracle Application Express Listener .................................................... 1-13Copy Oracle Application Express Images................................................................................... 1-13Launch the Administration Console ............................................................................................ 1-13Create Users and Roles................................................................................................................... 1-13

    About Roles............................................................................................................................... 1-14

  • iv

    Create Users .............................................................................................................................. 1-14Install the Deployment ................................................................................................................... 1-15Access Oracle Application Express Listener Administration................................................... 1-16

    Installing with Oracle Containers for J2EE (OC4J) ........................................................................ 1-17Download and Unzip Oracle Application Express Listener .................................................... 1-17Copy Oracle Application Express Images................................................................................... 1-17Start the OC4J Server ...................................................................................................................... 1-18Start the Application Server Control Console............................................................................. 1-18Create Users and Roles................................................................................................................... 1-18

    Create Roles .............................................................................................................................. 1-18Create Users .............................................................................................................................. 1-19

    Install the Deployment .................................................................................................................. 1-19Access Oracle Application Express Listener Administration................................................... 1-20

    Upgrading Oracle Application Express Listener ............................................................................ 1-20Redeploy Oracle WebLogic Server ............................................................................................... 1-21Redeploy Oracle GlassFish Server................................................................................................ 1-22Redeploy Oracle Containers for J2EE (OC4J).............................................................................. 1-22

    Upgrading Oracle Application Express Images .............................................................................. 1-23Copy Application Express Images When Using Oracle WebLogic Server............................. 1-23Copy Application Express Images When Using Oracle GlassFish Server ............................. 1-24Copy Application Express Images When Using Oracle Containers for J2EE (OC4J) ........... 1-24

    2 Configuring Oracle Application Express Listener Accessing Oracle Application Express Listener ................................................................................. 2-1

    Access Oracle Application Express Listener Administration...................................................... 2-1View Status Information ................................................................................................................... 2-2

    About Oracle Application Express Listener Administration .......................................................... 2-2Establishing a Database Connection .................................................................................................... 2-2

    Establish a Basic Connection ............................................................................................................ 2-3Establish a TNS Connection ............................................................................................................. 2-3Establish an Advanced Connection................................................................................................. 2-3About JDBC Settings.......................................................................................................................... 2-4

    Configuring Security ............................................................................................................................... 2-5About Allowed Procedures .............................................................................................................. 2-5

    Advantages of Allowed Procedures ........................................................................................ 2-6About Blocked Procedures ............................................................................................................... 2-6

    About the Internal Exclusion List ............................................................................................. 2-6About Database Validation Function.............................................................................................. 2-7

    About the Database Validation Function Format .................................................................. 2-7About Security Settings ..................................................................................................................... 2-8Understanding Security Processing ................................................................................................ 2-8

    Defining Caching ..................................................................................................................................... 2-9Specify Procedure Names to Cache Files........................................................................................ 2-9

    Creating Pre- Post Processing Procedures ........................................................................................ 2-10About Pre-processing Procedures ................................................................................................ 2-10About Post-processing Procedures............................................................................................... 2-10

    Viewing Status ....................................................................................................................................... 2-11

  • vAbout Statistics ................................................................................................................................ 2-11About Error Tracking ..................................................................................................................... 2-12About Logging................................................................................................................................. 2-12

    Configuring Miscellaneous Options ................................................................................................. 2-12

    3 RESTful APIs and Resource TemplatesWhat is a RESTful API? .......................................................................................................................... 3-1

    About Resource Templates ............................................................................................................... 3-1About Resource Template Administration.......................................................................................... 3-2

    Create a Resource Template ............................................................................................................. 3-2About URI Templates................................................................................................................. 3-2

    About the Entity Tag ......................................................................................................................... 3-3About Resource Handlers................................................................................................................. 3-3

    Add Other Handlers................................................................................................................... 3-3About Supported HTTP Methods ............................................................................................ 3-3Strategies When Choosing a Resource Handler Type........................................................... 3-4About Resource Handler Parameters ...................................................................................... 3-4Referencing Parameters ............................................................................................................. 3-4About Acceptable Media Types................................................................................................ 3-5About Security Constraints ....................................................................................................... 3-5

    About Resource Handler Types............................................................................................................. 3-5Query ................................................................................................................................................... 3-5

    With One Result Only ................................................................................................................ 3-6Comma Separated Values Query..................................................................................................... 3-6Media Resource .................................................................................................................................. 3-7PL/SQL Block..................................................................................................................................... 3-8

    Example: Creating an Image Gallery .................................................................................................... 3-9Before You Begin ................................................................................................................................ 3-9

    About URIs .................................................................................................................................. 3-9About API Entry Points .......................................................................................................... 3-10

    Create a Database Schema ............................................................................................................. 3-10Upload Images................................................................................................................................. 3-10Create an Image Upload Form...................................................................................................... 3-11Display the Image ........................................................................................................................... 3-12Display the Gallery ......................................................................................................................... 3-12Improve the Appearance of the Gallery ...................................................................................... 3-14

    Create gallery.css ..................................................................................................................... 3-14Create gallery.js ........................................................................................................................ 3-15

    About the RESTful API .................................................................................................................. 3-15About Resource Template Security.................................................................................................... 3-16

    Integration with Oracle Single Sign On ....................................................................................... 3-17External Authentication Using Apache JServ Protocol ............................................................. 3-17Example: Protecting Gallery Uploads.......................................................................................... 3-17

    Protect Upload Form ............................................................................................................... 3-17Protect Gallery POST Handler ............................................................................................... 3-18Test the Changes ...................................................................................................................... 3-18

  • vi

    A About the Configuration FileAbout the Listener Configuration File................................................................................................ A-1

    Locating the Configuration File ...................................................................................................... A-1How the Listener Searches for the Configuration File ......................................................... A-1

    Setting the Value of the config.dir Parameter............................................................................... A-2Understanding Configuration File Parameters ................................................................................. A-2About Configurable Parameters........................................................................................................... A-3

    B TroubleshootingOracle Application Express Images Not Displaying........................................................................ B-1Cannot Log In to Oracle Application Express Listener Administration ...................................... B-3

    Index

  • vii

    Preface

    Oracle Application Express Listener Installation and Developer Guide explains how to install and configure Oracle Application Express Listener as well as utilize exposed RESTful Application Programming Interfaces (APIs).

    Topics: Topic Overview

    Audience

    Documentation Accessibility

    Related Documents

    Conventions

    Third-Party License Information

    Topic OverviewThis document contains the following sections:

    AudienceThis document is intended for system administrators or application developers who are installing Oracle Application Express Listener. This guide assumes you are familiar with Web technologies and have a general understanding of Windows and UNIX platforms.

    Title Description

    Installing Oracle Application Express Listener

    Describes how to download and install Oracle Application Express Listener in various environments.

    Configuring Oracle Application Express Listener

    Explains how to use Oracle Application Express Listener Administration to set up a database connection, configure security and file caching, and perform other tasks.

    RESTful APIs and Resource Templates

    Explains how to use RESTful APIs to expose data stored in the Oracle Database.

    About the Configuration File Describes the Oracle Application Express Listener configuration file.

    Troubleshooting Describes common installation issues and offers solutions.

  • viii

    Documentation AccessibilityOur goal is to make Oracle products, services, and supporting documentation accessible to all users, including users that are disabled. To that end, our documentation includes features that make information available to users of assistive technology. This documentation is available in HTML format, and contains markup to facilitate access by the disabled community. Accessibility standards will continue to evolve over time, and Oracle is actively engaged with other market-leading technology vendors to address technical obstacles so that our documentation can be accessible to all of our customers. For more information, visit the Oracle Accessibility Program Web site at http://www.oracle.com/accessibility/.

    Accessibility of Code Examples in DocumentationScreen readers may not always correctly read the code examples in this document. The conventions for writing code require that closing braces should appear on an otherwise empty line; however, some screen readers may not always read a line of text that consists solely of a bracket or brace.

    Accessibility of Links to External Web Sites in DocumentationThis documentation may contain links to Web sites of other companies or organizations that Oracle does not own or control. Oracle neither evaluates nor makes any representations regarding the accessibility of these Web sites.

    Access to Oracle SupportOracle customers have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/support/contact.html or visit http://www.oracle.com/accessibility/support.html if you are hearing impaired.

    Related DocumentsFor more information, see these Oracle resources:

    Oracle Application Express Listener Release Notes

    Oracle Application Express Installation Guide

    Oracle Application Express Release Notes

    Oracle Database 2 Day + Application Express Developer's Guide

    Oracle Application Express Application Builder User's Guide

    Oracle Application Express SQL Workshop and Utilities Guide

    Oracle Application Express API Reference

    Oracle Application Express Migration Guide

    Oracle Application Express Administration Guide

    Oracle Database Concepts

    Oracle Database Advanced Application Developer's Guide

    Oracle Database Administrator's Guide

    For information about Oracle error messages, see Oracle Database Error Messages. Oracle error message documentation is available only in HTML. If you have access to the Oracle Database Documentation Library, you can browse the error messages by

  • ix

    range. Once you find the specific range, use your browser's "Find in Page" feature to locate the specific message. When connected to the Internet, you can search for a specific error message using the error message search feature of the Oracle online documentation.

    Many books in the documentation set use the sample schemas of the seed database, which is installed by default when you install Oracle. See Oracle Database Sample Schemas for information about how these schemas were created, and how you can use them yourself.

    For additional application examples, go to the Learning Library. Search for free online training content, including Oracle by Example (OBE), demos, and tutorials. To access the Oracle Learning Library, go to:

    http://www.oracle.com/technetwork/tutorials/index.html

    Printed documentation is available for sale in the Oracle Store at:

    http://shop.oracle.com/

    To download free release notes, installation documentation, white papers, or other collateral, visit the Oracle Technology Network (OTN). You must register online before using OTN; registration is free and can be done at:

    http://www.oracle.com/technology/membership/

    If you have a user name and password for OTN, then you can go directly to the documentation section of the OTN Web site at:

    http://www.oracle.com/technology/documentation/

    ConventionsThe following text conventions are used in this document:

    Third-Party License InformationOracle Application Express contains third-party code. Please see the Oracle Database Licensing Information book for notices Oracle is required to provide.

    Note, however, that the Oracle program license that accompanied this product determines your right to use the Oracle program, including the third-party software, and the terms contained in the following notices do not change those rights.

    Convention Meaningboldface Boldface type indicates graphical user interface elements associated

    with an action, or terms defined in text or the glossary.

    italic Italic type indicates book titles, emphasis, or placeholder variables for which you supply particular values.

    monospace Monospace type indicates commands within a paragraph, URLs, code in examples, text that appears on the screen, or text that you enter.

  • x

  • 1Installing Oracle Application Express Listener 1-1

    1Installing Oracle Application ExpressListener

    This section describes how to install Oracle Application Express Listener.

    Topics: About Oracle Application Express Listener

    About System Requirements

    Oracle Application Express Listener Installation Overview

    Downloading Oracle Application Express Listener

    Installing in Standalone Mode

    Installing with Oracle WebLogic Server

    Installing with Oracle GlassFish Server

    Installing with Oracle Containers for J2EE (OC4J)

    Upgrading Oracle Application Express Listener

    Upgrading Oracle Application Express Images

    About Oracle Application Express ListenerOracle Application Express Listener is a J2EE-based alternative for Oracle HTTP Server (OHS) and mod_plsql. The J2EE implementation offers increased functionality including a Web-based configuration, enhanced security, and file caching. Oracle Application Express Listener also provides increased flexibility by supporting deployments using Oracle WebLogic Server (WLS), Oracle Glassfish Server, and Oracle Containers for J2EE (OC4J) as well as a standalone mode.

    The Oracle Application Express architecture requires some form of Web server to proxy requests between a Web browser and the Oracle Application Express engine. Oracle Application Express Listener satisfies this need but its use goes beyond that of Oracle Application Express configurations. Using Oracle Application Express Listener simplifies the deployment process because there is no Oracle home required as connectivity is provided using an embedded JDBC driver.

    Supported Java Enterprise Edition Application ServersOracle Application Express Listener supports the following Java Enterprise Edition application servers:

  • About System Requirements

    1-2 Oracle Application Express Listener Installation and Developer Guide

    About System RequirementsOracle Application Express Listener system and space requirements are as follows:

    Oracle Database (Enterprise Edition, Standard Edition or Standard Edition One) release 10.2.0.3 or higher, or Oracle Database 10g Release 2 Express Edition or higher.

    Java 6 Update 20 JDK or higher.

    Java Servlet Specification 2.3 or higher.

    Web browser requirements:

    Microsoft Internet Explorer 8.0 or higher.

    Mozilla Firefox 3.0 or higher.

    Google Chrome 2.0 or higher.

    Oracle Application Express Listener Installation Overview To install Oracle Application Express Listener:

    1. Download and unzip Oracle Application Express Listener. See "Downloading Oracle Application Express Listener" on page 1-2.

    2. Install Oracle Application Express Listener. Options include:

    Standalone Mode. See "Installing in Standalone Mode" on page 1-3.

    Oracle WebLogic Server. See "Installing with Oracle WebLogic Server" on page 1-5.

    Oracle GlassFish Server. See "Installing with Oracle GlassFish Server" on page 1-12.

    Oracle Containers for J2EE (OC4J). See "Installing with Oracle Containers for J2EE (OC4J)" on page 1-17.

    3. Configure Oracle Application Express Listener. See "Configuring Oracle Application Express Listener" on page 2-1.

    Downloading Oracle Application Express ListenerTo install Oracle Application Express Listener:

    1. Download the file apex_listener.version.number.zip from the Oracle Application Express Listener download page. See:

    http://www.oracle.com/technetwork/developer-tools/apex-listener/downloads/index.html

    Application Server Supported ReleaseOracle WebLogic Server 11g Release 1 (10.3.3) or higher

    Oracle GlassFish Server Release 3 or higher

    Oracle Containers for J2EE Release 10.1.3.4 or higher

    See Also: "Upgrading Oracle Application Express Listener" on page 1-20 and "Troubleshooting" on page B-1

  • Installing in Standalone Mode

    Installing Oracle Application Express Listener 1-3

    Note that the version.number in the filename reflects the current release number.

    2. Unzip the downloaded zip file into a directory (folder) of your choice:

    UNIX and Linux: Unzip apex_listener.version.number.zip

    Windows: Double click the file apex_listener.version.number.zip in Windows Explorer

    Installing in Standalone ModeAlthough Oracle Application Express Listener supports the Java Enterprise Edition application servers described in "Supported Java Enterprise Edition Application Servers" on page 1-1, you also have the option of running in standalone mode. Standalone mode enables you to quickly deploy Oracle Application Express Listener, at the cost of control and manageability gained when using a JEE application server

    Topics: Install and Run in Standalone Mode

    About Standalone Configuration Options

    About Stopping the Server in Standalone Mode

    About JServ Protocol (AJP) Support

    Install and Run in Standalone ModeTo launch Oracle Application Express Listener in standalone mode:

    1. Download and unzip Oracle Application Express Listener. See "Downloading Oracle Application Express Listener" on page 1-2.

    2. Execute the following command:

    java jar \apex.war

    Where is the directory location of the unzipped Oracle Application Express Listener.

    3. When prompted, specify the location of the folder containing the static resources used by Oracle Application Express.

    4. When prompted, choose a user name and password for the Oracle Application Express Listener Administrator and Manager roles.

    You default Web browser starts and navigates to:

    http://:/apex/listenerConfigure

    Where:

    is the DNS name or IP address of the Administration Server

    is the listen port on which the Administration Server is listening for requests (port 8080 by default)

    5. Configure Oracle Application Express Listener. See "Configuring Oracle Application Express Listener" on page 2-1.

    Tip: You will only be prompted for the usernames and passwords the first time you launch Oracle Application Express Listener.

  • Installing in Standalone Mode

    1-4 Oracle Application Express Listener Installation and Developer Guide

    About Standalone Configuration OptionsOracle Application Express Listener provides several configuration options when running in standalone mode. For example, you can configure the location of the Oracle Application Express images directory, the home directory where Oracle Application Express Listener stores run-time files, and the HTTP listen port. Additionally, you can also remove run-time files from the Oracle Application Express home directory.

    To display a full list of available commands, execute the following command:

    java jar \apex.war --help

    Where is the directory location of the unzipped Oracle Application Express Listener.

    The following output displays:

    java [options] -jar apex.war [--help] Options: -Dapex.home=/path/to/apex : Path to the folder used to store the web container runtime, defaults to: ${java.io.tmpdir}/apex

    -Dapex.port=nnnn : HTTP listen port, default 8080

    -Dapex.ajp=nnnn : AJP (mod_jk) listen port, default none If an AJP Port is specified then HTTP access is disabled

    -Dapex.images=/images/location : Path to the folder containing static resources required by APEX

    -Dapex.erase=true : Erase the contents of ${apex.home} before launching

    --help : Print this usage message

    Consider the following example:

    java -Dapex.home=/tmp/apex -Dapex.images=/usr/local/apex/images -Dapex.port=8585 -Dapex.erase -jar /apex.war

    Specifying the options above produces the following results:

    1. Erase the contents of /tmp/apex.

    2. Extract the run-time files to /tmp/apex.

    3. Configure the run-time to listen on HTTP port 8585.

    4. Use the contents of /usr/local/apex/images for serving the static content required by Oracle Application Express.

    About Stopping the Server in Standalone ModeTo stop the Oracle Application Express Listener server in standalone mode, at a command prompt press CTRL+C.

  • Installing with Oracle WebLogic Server

    Installing Oracle Application Express Listener 1-5

    About JServ Protocol (AJP) SupportStandalone mode supports the Apache JServ Protocol (AJP), enabling it to be integrated with Web servers that support AJP (for example, Apache 2.2 and mod_jk). To enable the AJP, use the -Dapex.ajp command line parameter to indicate the port to listen on (usually 8009).

    Installing with Oracle WebLogic ServerYou can install Oracle Application Express Listener with Oracle WebLogic Server. Oracle WebLogic Server is available for download from Oracle Technology Network. See:

    http://www.oracle.com/technetwork/middleware/weblogic/downloads/weblogic-developer-vm-303434.html

    To learn more about installing Oracle WebLogic Server, see Oracle Fusion Middleware Getting Started With Installation for Oracle WebLogic Server and Oracle Fusion Middleware Installation Guide for Oracle WebLogic Server.

    Topics: Download and Unzip Oracle Application Express Listener

    Create Web Archive for Oracle Application Express Images

    Launch the Administration Server Console

    Install the Deployment

    Create Users and Roles

    Access Oracle Application Express Listener Administration

    Download and Unzip Oracle Application Express ListenerFor more information, see "Downloading Oracle Application Express Listener" on page 1-2.

    Create Web Archive for Oracle Application Express ImagesBefore you begin, you must create a Web archive (WAR) file to contain the Oracle Application Express image files. Using the Java Archive (jar) command, enter the following command to create a Web archive file named i.war:

    jar cvf0 \i.war C \images .

    Where:

    is the directory location of the unzipped Oracle Application Express Listener file.

    is the directory location of Oracle Application Express.

    Tip: Enabling AJP implicitly disables HTTP. It is not possible to listen for both protocols simultaneously.

    Tip: This section assumes that you have completed the installation process and are familiar with Oracle WebLogic Server. If you are unfamiliar with domains, managed servers, deployment, security, users and roles, refer to your Oracle WebLogic Server documentation.

  • Installing with Oracle WebLogic Server

    1-6 Oracle Application Express Listener Installation and Developer Guide

    Launch the Administration Server ConsoleTo launch the Administration Server console:

    1. Start an Administration Server.

    2. Launch the WebLogic Administration Console by typing the following URL in your Web browser:

    http://:/console

    Where:

    is the DNS name or IP address of the Administration Server

    is the listen port on which the Administration Server is listening for requests (port 7001 by default)

    3. Enter your WebLogic Administrator username and password.

    4. If your domain is in Production mode, click the Lock & Edit button on the left-pane below the submenu Change Center. If your domain is in Development mode this button will not appear.

    Install the Deployment

    To install the deployment:

    1. Go to the WebLogic Server Home Page. Below Domain Configuration, select Deployments.

    The Summary of Deployments displays.

    2. Click Install.

    Tip: The space and period (.) at the end of the command is required.

    Tip: The Oracle Application Express Listener files, apex.war and i.war, must be available before you start this task. See "Downloading Oracle Application Express Listener" on page 1-2 and "Create Web Archive for Oracle Application Express Images" on page 1-5

  • Installing with Oracle WebLogic Server

    Installing Oracle Application Express Listener 1-7

    3. Specify the location of the apex.war file and click Next.

    The apex.war file is located in the folder where you unzipped the Oracle Application Express Listener ZIP file. See "Downloading Oracle Application Express Listener" on page 1-2.

    Install Application Assistant appears.

    4. Select Install this deployment as an application and click Next.

    5. Select the servers and/or clusters to which you want to deploy the application or module and click Next.

    6. In the Optional Settings, specify the following:

    a. Name - Enter:

    apex

    b. Security - Select the following:

    Custom Roles: Use roles that are defined in the Administration Console; use policies that are defined in the deployment descriptor

    c. Source accessibility - Select:

    Use the defaults defined by the deployments targets

    7. Click Next.

    Tip: If you have not created additional Managed Servers or clusters, you will not see this assistant page.

  • Installing with Oracle WebLogic Server

    1-8 Oracle Application Express Listener Installation and Developer Guide

    A summary page appears.

    8. Under Additional configuration, select one of the following:

    Yes, take me to the deployments configuration - Displays the Configuration page.

    No I will review the configuration later - Returns you to the Summary of Deployments page.

    9. Review the summary of configuration settings that you have specified.

    10. Click Finish.

    11. Repeat the previous steps and deploy the i.war file.

    In the optional settings, specify the following:

    a. Name - Enter:

    i

    b. Security - Select:

    DD Only: Use only roles and policies that are defined in the deployment descriptors

    c. Source Accessibility - Select:

    Use the defaults defined by the deployments targets

    12. If your domain is in Production Mode, then on the Change Center click Activate Changes.

    Verifying the State and Health of apex and iIn the Summary of Deployments, select the Control tab and verify that both the apex and i State are Active and the Health status is OK.

  • Installing with Oracle WebLogic Server

    Installing Oracle Application Express Listener 1-9

    If apex or i are not Active, then enable them. In the Deployments table, select the check box adjacent to apex and/or i. Click Start and select Servicing all requests to make them active.

    Create Users and RolesOracle Application Express Listener requires users be assigned roles to access Oracle Application Express Listener Administration. This section describes how to create users and roles. For more information on security realms, users, and roles, see your Oracle WebLogic Server documentation.

    Topics: View Security Realms

    Create Users

    Create Roles

    View Security RealmsA security realm consists of a set of configured security providers, users, groups, security roles, and security policies. You must define each user in a security realm in order to access any WebLogic resources belonging to that realm. For more information on security realms, see your Oracle WebLogic Server documentation.

    To view a summary of security realms:

    1. If your domain is in Production mode, click Lock & Edit on the left pane below Change Center. If your domain is in Development mode, this button does not display.

    2. On the left pane below Domain Structure, click Security Realms.

    The Summary of Security Realms displays.

  • Installing with Oracle WebLogic Server

    1-10 Oracle Application Express Listener Installation and Developer Guide

    Create UsersNext, create two users. Create an administrator user to access the Oracle Application Express Listener Administration page and a manager user to access the Oracle Application Express Listener Status page.

    To create users:

    1. In the left pane of the Administration Console, select Security Realms. See "View Security Realms" on page 1-9.

    2. Select a security realm by clicking the security realm name (for example, myrealm).

    The Settings page displays.

    3. Click the Users and Groups tab and then click the Users tab.

    The User table displays the names of all defined users.

    4. Click New.

    5. In Name, enter the name of the user. For example:

    adminlistener

    User names are case sensitive and must be unique. Do not use commas, tabs or any other characters in the following comma-delimited list:

    , #, |, &, ?, ( ), { }

    6. In Description, enter a description (optional). For example:

    APEX Listener administrator user

    7. From the Provider list, select the Authentication provider for the user.

    Next, define a password for the user. Note that the minimum password length for a user defined in the WebLogic Authentication provider is 8 characters.

    8. In Password, enter a password.

    9. In Confirm Password, reenter the password.

    10. Click OK.

    The user appears in the User table.

    11. Create another user to access the Oracle Application Express Listener Status page. Specify the following:

    Name - managerlistener

    Description - APEX Listener manager user

    Create RolesOracle Application Express Listener requires you assign users roles to access the Application Express Listener Administration. There are two types of roles:

    Admin - The user has permission to access the Oracle Application Express Listener Administration page.

    Manager - The user has permission to access the Oracle Application Express Listener Status Information Page.

    To create roles:

  • Installing with Oracle WebLogic Server

    Installing Oracle Application Express Listener 1-11

    1. In the left pane of the Administration Console, select Security Realms. See "View Security Realms" on page 1-9.

    2. On the Summary of Security Realms page, select the name of the realm you want to secure the resource (for example, myrealm).

    The Settings page displays.

    3. Select the Roles and Policies tab and then select the Realm Roles.

    The Roles page organizes all of the domain's resources and corresponding roles in a hierarchical tree control.

    4. On the Roles page, expand apex and click Roles.

    a. In the Roles table, expand the Deployment node in the Names column until you find the resource apex.

    b. Expand apex and click Roles.

    5. On the Stand-Alone Web Application Scoped Roles table, click New.

    6. On Create Stand-Alone Web Applications Scoped Roles, specify the following:

    a. Name - Enter Admin

    b. Select the Provider Name for the role mapper (for example, XACMLRoleMapper).

    c. Click OK.

    The Stand-Alone Web Application Scoped Roles table with the Admin role displays.

    7. Click the Admin role.

    The Edit Stand-Alone Web Application Scoped Roles page displays.

    8. Create a role condition, which specifies who is in the scoped role and under which set of conditions:

    a. Under Role Condition, click Add Conditions.

    b. In Predicate List, select User and click Next.

    c. In User Argument Name, add adminlistener. Then, click Add and then Finish.

    The user adminlistener appears.

    d. Click Save.

    A status message appears.

    9. Repeat the steps above starting at step 5 and create another role with the following information:

    a. Name field - Enter Manager

  • Installing with Oracle GlassFish Server

    1-12 Oracle Application Express Listener Installation and Developer Guide

    b. In the Role Conditions Predicate List for Manager, select User and add managerlistener.

    c. Once you have completed creating the Manager role, click Save.

    10. If your domain is in Production Mode, in the left pane below the Change Center, click Release Configuration.

    Access Oracle Application Express Listener AdministrationTo access Oracle Application Express Listener Administration, in your Web browser go to:

    http://:/apex/listenerConfigure

    Next, configure Oracle Application Express Listener. See "Configuring Oracle Application Express Listener" on page 2-1.

    Installing with Oracle GlassFish ServerYou can install Oracle Application Express Listener with Oracle GlassFish Server. Oracle GlassFish Server is available for download from the Oracle Technology Network. See:

    http://www.oracle.com/technetwork/java/javaee/downloads/index-jsp-140710.html

    To learn more about installing Oracle GlassFish Server, see GlassFish Server Quick Start Guide and Oracle GlassFish Server Installation Guide.

    Topics: Download and Unzip Oracle Application Express Listener

    Copy Oracle Application Express Images

    Launch the Administration Console

    Create Users and Roles

    Install the Deployment

    Access Oracle Application Express Listener Administration

    Tip: This section assumes that you have completed the installation process and are familiar with GlassFish Server. If you are unfamiliar with domains, servers, applications, security, or users, see your Oracle GlassFish Server documentation.

  • Installing with Oracle GlassFish Server

    Installing Oracle Application Express Listener 1-13

    Download and Unzip Oracle Application Express ListenerFor more information, see "Downloading Oracle Application Express Listener" on page 1-2.

    Copy Oracle Application Express ImagesBefore you begin, you must copy Oracle Application Express images.

    To copy Oracle Application Express images:

    1. Create folder named i in:

    /domains//docroot

    2. Copy all files and folders in the Oracle Application Express images directory:

    /images

    Paste the copied files and folder to:

    /domains//docroot/i

    If the images are not in this location, the Oracle Application Express login page will appear to be missing images and style sheets.

    Launch the Administration ConsoleAt least one GlassFish server domain must be started before you start the Administration Console.

    To launch the Administration Console:

    1. Launch the Administration Console by typing the following URL in your Web browser:

    http://localhost:4848

    2. If prompted, log in to the Administration Console.

    Create Users and RolesOracle Application Express Listener requires users be assigned roles to access Oracle Application Express Listener Administration. This section describes how to create users and roles. For more information on security realms, users, group list, or roles, see your Oracle GlassFish Server documentation.

    Topics: About Roles

    Create Users

    Tip: Do not include the images folder. Copy only the files and folders below the Oracle Application Express images folder.

    Tip: You will be prompted to log in if you chose to require an administration password at the time GlassFish server was installed.

  • Installing with Oracle GlassFish Server

    1-14 Oracle Application Express Listener Installation and Developer Guide

    About RolesOracle Application Express Listener requires you assign users roles to access the Application Express Listener Administration. There are two types of roles:

    Admin - The user has permission to access the Oracle Application Express Listener Administration page.

    Manager - The user has permission to access the Oracle Application Express Listener Status Information Page.

    You can enable a default principal-to-role mapping on the Application Server using the Admin Console if the group list names is defined the same as the role names

    To enable a default principal-to-role mapping:

    1. On the navigation tree, select Configuration and then Security.

    The Security page displays.

    2. Select the check box next to Default Principal to Role Mapping.

    3. Click Save.

    Create UsersYou must create users to access the Oracle Application Express Administration page and Status page.

    To create users:

    1. In the navigation tree, expand the Configuration node.

    2. Expand the Security node.

    3. Expand the Realms node.

    4. Select the realm to which to add your user (for example, file).

    The Edit Realm page appears.

    5. On the Edit Realm page, click the Manage Users button.

    The File Users page appears.

    6. On the File Users page, click New.

    The New File Realm User page appears.

    7. On the New File Realm User page, create an Admin user:

    a. User ID - Enter the name of the Oracle Application Express Listener administrator:

    adminlistener

    b. Group List - Enter the role to which the user belong:

    Admin

    c. New Password - Enter a unique password.

    d. Confirm New Password - Enter the password again.

    e. Click OK.

    Tip: Enabling the Default Principal to Role requires the Group List to be the same as the role name as described in the sect section.

  • Installing with Oracle GlassFish Server

    Installing Oracle Application Express Listener 1-15

    8. Repeat the previous steps and create another user for the Oracle Application Express Listener manager, by specifying the following:

    a. User ID: managerlistener

    b. Group List: Manager

    c. Click OK.

    Install the Deployment

    To install the deployment:

    1. On the navigation tree, click the Application node.

    The Applications page displays.

    2. Click the Deploy button.

    The Deploy Applications or Modules page displays.

    3. Select Packaged File to be Uploaded to the Server and click Browse.

    4. Navigate to the location of the apex.war file, select the file, and click Open.

    The Deploy Applications or Modules page displays.

    5. On the Deploy Applications or Modules page, specify the following:

    a. Type: Web Application

    b. Context Root: apex

    c. Application Name: apex

    d. Status: Enabled

    e. Description: Application Express Listener

    f. Accept all other default settings and click OK.

    Tip: The Oracle Application Express Listener files, apex.war must be available before you start this task. See "Downloading Oracle Application Express Listener" on page 1-2.

  • Installing with Oracle GlassFish Server

    1-16 Oracle Application Express Listener Installation and Developer Guide

    The Applications page appears. A check mark should appear in the Enabled field for apex

    Access Oracle Application Express Listener AdministrationTo access Oracle Application Express Listener Administration, in your Web browser go to:

    http://:/apex/listenerConfigure

    Where:

    is the DNS name or IP address of the Administration Server

    is the listen port on which the Administration Server is listening for requests

    Next, configure Oracle Application Express Listener. See "Configuring Oracle Application Express Listener" on page 2-1.

    Tip: If a check mark does not appear in the Enabled column for apex, then select the check box next to apex and click Enable.

  • Installing with Oracle Containers for J2EE (OC4J)

    Installing Oracle Application Express Listener 1-17

    Installing with Oracle Containers for J2EE (OC4J)You can install Oracle Application Express Listener with Oracle Containers for J2EE (OC4J). Oracle Containers for J2EE (OC4J) is available for download from the Oracle Technology Network. See:

    http://www.oracle.com/technetwork/middleware/ias/downloads/utilsoft-090603.html

    To learn more about installing Oracle Containers for J2EE (OC4J), see Oracle Containers for J2EE Installation Guide.

    Topics: Download and Unzip Oracle Application Express Listener

    Copy Oracle Application Express Images

    Start the OC4J Server

    Start the Application Server Control Console

    Create Users and Roles

    Install the Deployment

    Access Oracle Application Express Listener Administration

    Download and Unzip Oracle Application Express ListenerFor more information, see "Downloading Oracle Application Express Listener" on page 1-2.

    Copy Oracle Application Express ImagesBefore you begin, you must copy Oracle Application Express images.

    To copy Oracle Application Express images:

    1. Create a folder named i in:

    /j2ee/home/default-web-app

    2. Copy all files and folders in the Oracle Application Express images directory:

    /images

    Paste the copied files and folder to:

    /j2ee/home/default-web-app/i

    If the images are not in this location, the Oracle Application Express login page will appear and be missing images and style sheets.

    Tip: This section assumes that OC4J is already installed and you are familiar with OC4J. If you are unfamiliar with servers, deployment, security, users, and roles, refer to your Oracle Containers for J2EE documentation.

    Tip: Do not include the images folder. Copy only the files and folders below the Oracle Application Express images folder.

  • Installing with Oracle Containers for J2EE (OC4J)

    1-18 Oracle Application Express Listener Installation and Developer Guide

    Start the OC4J ServerThe default port for the OC4J Server is 8888. If you must change the port number, edit the following file:

    /j2ee/home/config/default-web-site.xml

    You must start the OC4J Server before you start the Application Server Control Console. Consider the following example:

    cd /j2ee/homejava -jar oc4j.jar

    To learn more, see your Oracle for Containers J2EE documentation.

    Start the Application Server Control ConsoleTo start the Application Server Control Console:

    1. Typing the following URL in your Web browser:

    http://localhost:8888/em

    2. When prompted, log in with the oc4jadmin account.

    Create Users and RolesOracle Application Express Listener requires users be assigned roles in order to access Oracle Application Express Listener Administration. This section describes how to create users and roles. For more information on security realms, users, and roles refer to your Oracle for Containers J2EE documentation.

    Topics: Create Roles

    Create Users

    Create RolesOracle Application Express Listener requires you assign users roles to access the Application Express Listener Administration. There are two types of roles:

    Admin - The user has permission to access the Oracle Application Express Listener Administration page.

    Manager - The user has permission to access the Oracle Application Express Listener Status Information Page.

    To create roles:

    1. On the OC4J Home page, click the Administration tab.

    2. Expand the Security node.

    3. Locate Security Providers and click the Go To Task icon.

    4. Click Instance Level Security.

    The Instance Security Level page displays.

    Tip: If this is your first-time initializing the server, you will be prompted to enter a password for the OC4J administrator account. The username for this account defaults to oc4jadmin.

  • Installing with Oracle Containers for J2EE (OC4J)

    Installing Oracle Application Express Listener 1-19

    5. Click the Realms tab.

    6. Use an existing realm or create a realm.

    7. Click the selected realms Roles number.

    The Roles page displays.

    8. Create the role, Admin:

    a. Click the Create button.

    b. On the Name field enter Admin.

    c. Click OK.

    9. Create the role, Manager:

    a. Click the Create button.

    b. In Name, enter Manager

    c. Click OK.

    Create UsersYou must create users to access the Oracle Application Express Administration page and Status page.

    To create users:

    1. In the Instance Security Level page, click the selected realms Users number.

    The Users page displays.

    2. Create a user for the Oracle Application Express Listener admin:

    a. Click the Create button.

    b. In Name, enter adminlistener and a password.

    c. For Selected Roles, select Admin.

    d. Click OK.

    3. Create another user for the Oracle Application Express Listener manager:

    a. Click the Create button.

    b. In Name, enter managerlistener and specify a password.

    c. For Selected Roles, select Manager.

    d. Click OK.

    4. On the top page, click the OC4J:home link.

    Install the Deployment

    To install the deployment:

    1. On the OC4J Home page, click the Applications tab.

    The Applications page displays.

    Tip: The Oracle Application Express Listener files, apex.war must be available before you start this task. See "Downloading Oracle Application Express Listener" on page 1-2.

  • Upgrading Oracle Application Express Listener

    1-20 Oracle Application Express Listener Installation and Developer Guide

    2. Click the Deploy button.

    The Deploy: Select Archive page displays.

    3. On the Deploy: Select Archive page:

    a. Select Archive is present on local host. Upload the archive to the server where Application Server Control is running.

    b. Specify the location of the apex.war. file.

    c. Click Next.

    The Deploy: Application Attributes page displays.

    4. In the Application Name field, enter apex and click Next.

    The Deploy: Deployment Settings displays.

    5. In the Deployment Tasks, click Configure Class Loadings Go To Task.

    The Deployment Settings: Configure Class Loading page displays.

    6. On the Deployment Settings: Configure Class Loading page:

    a. In the Import Shared Libraries, deselect the Inherit parent applications shared library imports check box.

    Oracle Application Express Listener contains its own libraries in the apex.war file and does not use the OC4J Shared Libraries. Also, verify that the Import column check boxes for all the Shared Library deselected.

    b. Click OK.

    7. Click the Deploy button.

    A confirmation message with the following message displays:

    The Application apex has been successfully deployed.

    8. Return to the Application page by clicking the Return button.

    9. Verify that apex is listed on the Applications page and the Status displays a green up-arrow indicating that it is Active.

    Access Oracle Application Express Listener AdministrationTo access Oracle Application Express Listener Administration, in your Web browser go to:

    http://:/apex/listenerConfigure

    Next, configure Oracle Application Express Listener. See "Configuring Oracle Application Express Listener" on page 2-1.

    Upgrading Oracle Application Express ListenerUpgrading Oracle Application Express Listener requires that you redeploy the application.

    Tip: Before you begin the upgrade process, you must download and unzip Oracle Application Express Listener. See "Downloading Oracle Application Express Listener" on page 1-2.

  • Upgrading Oracle Application Express Listener

    Installing Oracle Application Express Listener 1-21

    Topics: Redeploy Oracle WebLogic Server

    Redeploy Oracle GlassFish Server

    Redeploy Oracle Containers for J2EE (OC4J)

    Redeploy Oracle WebLogic ServerThis section describes how to upgrade Oracle Application Express Listener when Oracle WebLogic Server.

    To redeploy Oracle WebLogic Server:

    1. Download and unzip Oracle Application Express Listener. See "Downloading Oracle Application Express Listener" on page 1-2.

    2. Start an Administration Server domain.

    3. Launch the Administration Server console:

    a. Start an Administration Server.

    b. Launch the WebLogic Administration Console by typing the following URL in your Web browser:

    http://:/console

    Where:

    is the DNS name or IP address of the Administration Server

    is the listen port on which the Administration Server is listening for requests (port 7001 by default)

    c. Enter the WebLogic Administrator username and password.

    d. If your domain is in Production mode, click the Lock & Edit button on the left-pane below the submenu Change Center. If your domain is in Development mode this button will not appear.

    4. Go to the WebLogic Server Home Page. Below the Domain Configuration, select Deployments.

    The Summary of Deployments displays.

    5. Click the check box next to apex to enable the Update button.

    6. Click the Update button.

    The Update Application Assistant displays.

    7. Specify the location of your apex.war file.

    8. Click Next.

    9. Review your choices and click the Finish button.

    The Summary of Deployments. Messages appear indicating the status of apex deployment.

    10. Follow any additional instructions provided in the Messages.

    11. If your domain is in Production Mode, on the Change Center click Activate Changes.

  • Upgrading Oracle Application Express Listener

    1-22 Oracle Application Express Listener Installation and Developer Guide

    Redeploy Oracle GlassFish ServerTo redeploy Oracle GlassFish Server:

    1. Unzip Oracle Application Express Listener. See "Downloading Oracle Application Express Listener" on page 1-2.

    2. Launch the Administration Console:

    a. Launch the Administration Console by typing the following URL in your Web browser:

    http://localhost:4848

    b. If prompted, log in to the Administration Console.

    3. On the navigation tree, click the Application node.

    The Applications page displays.

    4. Select the check box next to apex.

    5. Click the Disable button.

    An X appears in the Enabled field next to apex.

    6. Click the Redeploy link for apex.

    The Redeploy Applications or Modules page displays.

    7. Specify the location of your apex.war file.

    8. Click OK.

    The Application page appears.

    9. Verify that a check mark displays on the Enabled field next to apex.

    Redeploy Oracle Containers for J2EE (OC4J)To redeploy Oracle Containers for J2EE (OC4J):

    1. Unzip Oracle Application Express Listener. See "Downloading Oracle Application Express Listener" on page 1-2.

    2. Start the OC4J Server. See "Start the OC4J Server" on page 1-18.

    3. To start the Application Server Control Console:

    a. Typing the following URL in your Web browser:

    http://localhost:8888/em

    b. When prompted, log in with the oc4jadmin account.4. On the navigation tree, click the Application node.

    Tip: At least one GlassFish server domain must be started before you start the Administration Console.

    Tip: You will be prompted to log in if you chose to require an administration password at the time GlassFish server was installed.

    Tip: You must start the OC4J Server before you start the Application Server Control Console.

  • Upgrading Oracle Application Express Images

    Installing Oracle Application Express Listener 1-23

    The Applications page displays.

    5. Click the check box next to apex and then select the Redeploy button.

    The Redeploy: Select Archive and deployment plan page displays.

    6. Specify the location of your apex.war file.

    7. Click Next.

    The Redeploy: Application Attributes page displays.

    8. Review the information.

    9. Click Next.

    The Redeploy: Deployment Settings displays.

    10. Click the Redeploy button.

    The Applications tab appears.

    11. Verify that the apex Status displays a green up-arrow indicating that the Status is Up (Active).

    Upgrading Oracle Application Express ImagesIf you are upgrading Oracle Application Express, you must copy the Oracle Application Express images from the upgraded version. Having Oracle Application Express images on your application server from a previous release, will result in errors.

    Topics: Copy Application Express Images When Using Oracle WebLogic Server

    Copy Application Express Images When Using Oracle GlassFish Server

    Copy Application Express Images When Using Oracle Containers for J2EE (OC4J)

    Copy Application Express Images When Using Oracle WebLogic ServerTo copy Application Express images when using Oracle WebLogic Server:

    1. Create a Web archive for the images directory. See "Create Web Archive for Oracle Application Express Images" on page 1-5.

    2. Start an Administration Server domain.

    3. Launch the Administration Server console:

    a. Start an Administration Server.

    b. Launch the WebLogic Administration Console by typing the following URL in your Web browser:

    http://:/console

    Where:

    is the DNS name or IP address of the Administration Server

    is the listen port on which the Administration Server is listening for requests (port 7001 by default)

    c. Enter the WebLogic Administrator username and password.

  • Upgrading Oracle Application Express Images

    1-24 Oracle Application Express Listener Installation and Developer Guide

    d. If your domain is in Production mode, click the Lock & Edit button on the left-pane below the submenu Change Center. If your domain is in Development mode this button will not appear.

    4. Go to the WebLogic Server Home Page. Below the Domain Configuration, select Deployments.

    The Summary of Deployments displays.

    5. Click the check box next to i to enable the Update button.

    6. Click the Update button.

    The Update Application Assistant displays.

    7. Specify the location of your i.war file.

    8. Click Next.

    9. Review your choices and click the Finish button.

    The Summary of Deployments. Messages appear indicating the status of apex deployment.

    10. Follow any additional instructions provided in the Messages.

    11. If your domain is in Production Mode, on the Change Center click Activate Changes.

    Copy Application Express Images When Using Oracle GlassFish ServerTo copy Application Express images when using GlassFish Enterprise Server:

    1. Delete all files and folders in folder i in:

    /domains//docroot/i

    2. Follow the instructions in "Copy Oracle Application Express Images" on page 1-13.

    Copy Application Express Images When Using Oracle Containers for J2EE (OC4J)To copy Application Express images when using J2EE (OC4J):

    1. Delete all files and folders in folder i in:

    /j2ee/home/default-web-app/i

    2. Follow the instructions in "Copy Oracle Application Express Images" on page 1-17.

  • 2Configuring Oracle Application Express Listener 2-1

    2Configuring Oracle Application ExpressListener

    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

    About Oracle Application Express Listener Administration

    Establishing a Database Connection

    Configuring Security

    Defining Caching

    Creating Pre- Post Processing Procedures

    Viewing Status

    Configuring Miscellaneous Options

    Accessing Oracle Application Express ListenerOracle 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" on page 1-1.

    Topics: Access Oracle Application Express Listener Administration

    View Status Information

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

    http://:/apex/listenerConfigure

  • About Oracle Application Express Listener Administration

    2-2 Oracle Application Express Listener Installation and Developer Guide

    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://:/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 InformationYou can view Oracle Application Express Listener Status information, by entering the following URL in your Web browser:

    http://:/apex/listenerStatus

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

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

    Connection - See "Establishing a Database Connection" on page 2-2.

    Security - "Configuring Security" on page 2-5.

    Caching - "Defining Caching" on page 2-9.

    Pre-Post Processing - "Creating Pre- Post Processing Procedures" on page 2-10.

    Status - "Viewing Status" on page 2-11.

    Miscellaneous - "Configuring Miscellaneous Options" on page 2-12.

    Establishing a Database ConnectionUse the Connection tab to enter database credentials. Key elements of this page include:

    Username - Defines the name of the database user for the connection.

    Password - Defines the password of the specified database user.

    Connection Type - Select Basic, TNS, or Advanced. The fields that display depend on the type selected.

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

    Topics: Establish a Basic Connection

    Establish a TNS Connection

    Establish an Advanced Connection

    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

    Configuring Oracle Application Express Listener 2-3

    About JDBC Settings

    Establish a Basic ConnectionTo 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:

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

    b. 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 ConnectionTo 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:

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

    b. 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 ConnectionYou 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.

  • Establishing a Database Connection

    2-4 Oracle Application Express Listener Installation and Developer Guide

    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:::

    Example:

    jdbc:oracle:thin:myhost:1521:orcljdbc:oracle:oci8:myhost:1521:orcl

    Service name:

    jdbc:oracle:thin:@//:/

    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.

    About JDBC SettingsUse 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.

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

  • Configuring Security

    Configuring Oracle Application Express Listener 2-5

    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.

    Configuring SecurityUse 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

    About Blocked Procedures

    About the Internal Exclusion List

    About Database Validation Function

    About Security Settings

    Understanding Security Processing

    About Allowed ProceduresUse 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.

    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.

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

  • Configuring Security

    2-6 Oracle Application Express Listener Installation and Developer Guide

    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.

    Advantages of Allowed ProceduresThe 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 ProceduresUse 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.

    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" on page 2-6.

    5. Click Apply.

    About the Internal Exclusion ListThe Oracle Application Express Listener includes an internal exclusion list which blocks users from accessing the following:

    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.

  • Configuring Security

    Configuring Oracle Application Express Listener 2-7

    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 FunctionUse 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" on page 2-8.

    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.

    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 FormatThe validation function must return a boolean and have one argument for the procedure name. Consider the following example:

    CREATE OR REPLACEFUNCTION CHECK_VALID_PROCEDURE (Procedure_Name IN VARCHAR2) RETURN BOOLEAN ASBEGIN IF (UPPER(Procedure_Name) LIKE ('CUST%')) THEN

  • Configuring Security

    2-8 Oracle Application Express Listener Installation and Developer Guide

    RETURN true; ELSE RETURN false; END IF;END CHECK_VALID_PROCEDURE;

    About Security SettingsWhen 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.

    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 ProcessingIf 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

    Configuring Oracle Application Express Listener 2-9

    Defining CachingThe 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

    Specify Procedure Names to Cache FilesTo specify procedure names to allow the caching of files:

    1. Click the Caching tab.

    The Cache Files page appears.

    2. Specify the following:

    Option DescriptionProcedure 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.

  • Creating Pre- Post Processing Procedures

    2-10 Oracle Application Express Listener Installation and Developer Guide

    3. To configure Cache Settings, click Cache Settings.

    Specify the following Cache Settings options:

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

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

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

    4. Click Apply.

    Creating Pre- Post Processing ProceduresClick 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

    About Post-processing Procedures

    About Pre-processing ProceduresClick 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.

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

    About Post-processing ProceduresClick 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.

    Tip: Once you specify a Procedure Name, the Keep files for the specified duration and Keep most recently used files button are enabled.

  • Viewing Status

    Configuring Oracle Application Express Listener 2-11

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