Oracle on the Web – Part 3 – Using Applications in HTML DB

In the first two parts of
this series, we looked at the basic HTTP Server behind HTML DB (and Application
Server) and the basic installation and setup of HTML DB itself. In this
article, we will look at a simple example of adding a page to an existing
application and detail some of the steps involved. Before moving on to the
example, I would like to clarify a few points about the HTTP Server and HTML

What Oracle’s HTTP Server Is and Is Not

As mentioned in several
places in the official documentation, Oracle HTTP Server (OHS) is based on a
version of the Apache Web server (1.3.28, to be exact). As of the date of this
article’s publication (June 2005), the current release of Apache is 2.0.54. It
should be somewhat apparent that the difference in versions is significant.
There are other Oracle products that use a later version of OHS. Application
Server 10g, for example, uses a release from the 2.0 series. What are the ramifications
of using Apache 1.3.28?

Take a quick tour of the
Apache Web site and read the high-level release notes. Start here – – and follow the
links to the announcements for 1.3.33 and 2.0.54. The 1.3.33 notes state in

We consider Apache 1.3.33
to be the best version of Apache 1.3 available and we strongly recommend that
users of older versions, especially of the 1.1.x and 1.2.x family, upgrade as
soon as possible.

Some of the major components
of OHS (again, based on Apache) are the Listener and modules.

  • HTTP Listener: Oracle HTTP Server is based on an Apache HTTP
    listener to serve client requests. An HTTP server listener handles incoming
    requests and routes them to the appropriate processing utility.

  • Modules (mods): Many of the standard Apache modules are included
    with Oracle HTTP Server. Oracle also includes several internal modules that are
    specific to Oracle Database components.

One module in particular is
of key importance for Oracle and that is the mod_plsql module. This module is
Oracle-specific and is not part of the generic version of Apache you get from
the Apache Software Foundation (ASF). The Oracle® HTTP Server Administrator’s Guide lists the modules Oracle includes and the ones from
ASF Oracle does not support. The implications are that if there is a problem
with an Oracle-supplied module, there may not be much help or support available
from the Apache user group mailing lists, and there may be “normal” modules
from Apache that are unavailable to you. HTML DB uses mod_plsql (that is what
the “pls” represents in the URI you use to login to a workspace or the admin

A third major point is that
of controlling the Apache part of OHS. In a normal Apache HTTP Server
installation/environment, you can use apachectl to start and stop the server,
and on Windows, you can start/stop the server via services. OHS, however,
requires that you use OPMN.

Oracle HTTP Server is
managed by Oracle Process Manager and Notification Server (OPMN). You must
always use the
opmnctl utility to
start, stop and restart Oracle HTTP Server. Otherwise, the configuration
management infrastructure cannot detect or communicate with the Oracle HTTP
Server processes, and problems may occur.

There are some configuration
modifications normally available with Apache that OHS does support. Path
aliasing and logging options are two such examples. However, for the most part,
what you see is what you get when it comes to OHS, so it is kind of a
trade-off. If you do not know much about setting up a server, Oracle does
virtually all of the work for you. If you do know a lot and like to customize
the settings, you may be out of luck because of the incompleteness of the
Apache components.

HTML DB Versions and Examples

The version of HTML DB used
so far is in the 1.5 series. If you look closely on the generated Web page, you
can see the exact version.

A newer version (1.6) of
HTML DB is available at OTN and it includes several enhancements over 1.5. More
information (aside from what comes in the documentation) is available at
The “obe” username (from before) comes from the Oracle By Example help/demo
area at OTN. You can also request a workspace (hosted by Oracle) instead of
installing and using HTML DB on your own computer.

Oracle Corporation has put a
lot of development effort into HTML DB, and one of the most visible or public
uses of it can be found at the Ask Tom Web site.

As a DBA responsible for
maintaining clients and supporting developers who use Forms and Reports, here
are two reasons why you should be very interested in adding HTML DB DBA to your

First, because any
(authorized) user can access the database via a browser, you may be able to say
goodbye to the client software installation and its attendant maintenance in
your organization. If you have users who are primarily view only, you can
easily create a collection and have those users browse to obtain what it is
they are looking for.

Second, Forms and Reports
can be (to a large degree) developed and used via HTML DB – all without the
overhead of using actual Forms or Reports files. For users with simple needs
such as performing DML directly on a few tables, you do not need the overhead
of Application Server and Developer Suite. The example shown in the next part
does exactly that – it uses a simple tabular form that is easily customizable
and takes around three minutes to create.

Using an HTML DB Demonstration Application to Create a Form

Login to a created workspace
and navigate to the Review Demonstration Applications in the Task area (bottom

Note: I am using the “ADMIN”
user in the OBE workspace from the last

Click Install to install the
Collection showcase. Click Run to view the EMP collection.

In our example, we will add
a page to this application. The page will be a tabular form whose end result
will allow you to perform DML on an employees table.

Steve Callan
Steve Callan
Steve is an Oracle DBA (OCP 8i and 9i)/developer working in Denver. His Oracle experience also includes Forms and Reports, Oracle9iAS and Oracle9iDS.

Latest Articles