How-To Document

Install and Configure Oracle Application Express (formerly called HTML DB) for use by a 9iR2 Oracle HTTP Server

Date: 19-Feb-2004
NOTE: This document applies only to HTML DB installations performed using the Oracle 10g Companion CD. For manual installations, please see the Installation Guide.

After completing this How-To, you should be able to:

  • Install Oracle HTML DB
  • Configure a 9iR2 version of Oracle HTTP Server for use with Oracle HTML DB

Table of Contents

Introduction

To Install Oracle HTML DB for use with a 9iR2 Oracle HTTP Server you will start by following the same process as using it with Oracle HTTP Server 10 g. You use the companion CD to do a complete install of Oracle HTML DB with Oracle HTTP Server. Then you manually configure the 9iR2 Oracle HTTP Server to be able to access Oracle HTML DB. Finally, you can optionally remove the Oracle HTTP Server 10 g home. Note that the database you specify to install in may be version 9.2.0.3 or later.

Install Oracle HTML DB

Use the operating system specific installation instructions on the companion CD to install Oracle HTML DB and Oracle HTTP Server 10 g in a new Oracle home. You may alternatively follow the Oracle By Example document called Installing and Configuring Oracle HTML DB.

Copy Images

For the rest of this document the environment variable ORACLE_HOME_9 will refer to the path on the file system to the existing Oracle 9iR2 home that you wish to use, and ORACLE_HOME_10 will refer to the path on the file system to the Oracle 10 g home you created in the first step.

You must recursively copy the images directory located in ORACLE_HOME_10/marvel/images to somewhere on the file system that contains ORACLE_HOME_9. On a Windows system you can simply use the Windows Explorer or execute a command from the command prompt like the one that follows.

  C:\>xcopy /E /I %ORACLE_HOME_10%\marvel\images %ORACLE_HOME_9%\images


On UNIX or Linux based systems, you execute a command like the following.

  # cp -r $ORACLE_HOME_10/marvel/images $ORACLE_HOME_9/images


Modify httpd.conf

The next step is to modify the file httpd.conf, located ORACLE_HOME_9/Apache/Apache/conf/httpd.conf to include an alias called /i/ to point to the file system path of the images directory that you copied in the second step. Open the file in a text editor and add an entry for the alias. On Windows systems the Alias line would look like the following:

  Alias /i/ "E:\oracle\ora92\images/"


Notice the forward slash (/) at the end of the path. It is important to include this. On a UNIX or Linux system, the forward slash is already present such as:

  Alias /i/ "/home/oracle/OraHome1/images/"


To support HTML DB versions later than 1.6.1, i is necessary to add the following lines if they does not currently exist:

AddType text/xml             xbl
AddType text/x-component     htc 


Modify wdbsvr.app

The file wdbsvr.app contains information about Database Access Descriptors (DADs). A DAD is a set of values that specify how the Oracle HTTP Server component modplsql connects to the database server to fulfill an HTTP request. You create a DAD to specify how to connect to the Oracle HTML DB instance. To create the DAD you modify the file ORACLE_HOME_9/Apache/modplsql/cfg/wdbsvr.app and add an entry for Oracle HTML DB. You can copy and paste the following but you will change the connect_string, password and nls_lang parameters. connect_string is connect information for the database where Oracle HTML DB was installed in the first step. It is in the format host:port:sid. Note that if the 9iR2 version of Oracle HTTP Server you wish to use is installed in the same Oracle home as the database you specified to use for Oracle HTML DB, you can most likely leave this parameter blank. password is the HTML DB password that you specified in the Install Oracle HTML DB step, and nls_lang should match the nls_lang of the database. You can find information about your database nls_lang by querying the view nls_database_parameters.

  [DAD_htmldb]                                
  connect_string = 138.2.84.182:1521:orcl                     
  password = htmldb                      
  username = htmldb_public_user             
  default_page = htmldb   
  document_table = wwv_flow_file_objects$   
  document_path = docs                      
  document_proc = wwv_flow_file_mgr.process_download                           
  reuse = No                                                         
  enablesso = No                                                    
  stateful = STATELESS_RESET                                                            
  nls_lang = American_America.AL32UTF8


Stop and Start Oracle HTTP Server

In order for your changes to httpd.conf and wdbsvr.app to take affect stop and start Oracle HTTP Server 9iR2. On windows you can use the Start Menu => Programs => Oracle - OraHome => Oracle HTTP Server => Stop HTTP Server powered by Apache & Start HTTP Server powered by Apache, or by executing the following commands:

  C:\>%ORACLE_HOME_9%\Apache\Apache\apache -k shutdown
  
  C:\>%ORACLE_HOME_9%\Apache\Apache\apache


On a UNIX\Linux based system, execute:

  # $ORACLE_HOME_9/Apache/Apache/bin/apachectl stop
  
  # $ORACLE_HOME_9/Apache/Apache/bin/apachectl start


Remove Oracle Application Server 10 g Home

By completing the above steps you no longer have a need for the Oracle 10 g home. All of the Oracle HTML DB code is now compiled as PL/SQL inside the database server you specified at install time, and you copied the images directory to your Oracle 9iR2 home. If you are not going to use Oracle HTTP Server 10 g run the Oracle Universal Installer from the 10 g home and select the Deinstall Products option.

Feel free to discuss this how-to in the OTN HTML DB Discussion Forum.