This chapter describes the basic files you need to configure Oracle Forms, provides an overview of how Forms Services run in Oracle Application Server, and describes the steps you need to follow to deploy Forms applications. After installation is complete, you can use the information in this chapter to change your initial configuration or make modifications as your needs change.
This chapter contains the following sections:
This section introduces the basic files you need to configure Forms applications. For more advanced configuration topics, see Chapter 4, "Configuring Forms Services with Enterprise Manager".
This section contains the following sub-sections:
Location of files are given relative to the directory. Forward slashes should be replaced by back slashes on Windows.
Oracle Forms configuration files allow you to specify parameters for your Forms, which you manage through the Application Server Control. This section contains the following sub-sections:
If you manually edit any of the configuration or environment files, you'll need to restart Enterprise Manager so that Enterprise Manager can read all changes. If you do not restart Enterprise Manager, any changes that you make through Enterprise Manager will overwrite any manual changes you've made to these files.
Location: forms90/server This file contains environment settings for Forms runtime and can be found in the /forms90/server directory. On UNIX, default.env should include the PATH and LD_LIBRARY_PATH.
This is the Forms Servlet configuration file that contains the following:
Variables (%variablename%) in the baseHTML file are replaced with the appropriate parameter values specified in the formsweb.cfg file and from query parameters in the URL request (if any).
You manage the formsweb.cfg file through Enterprise Manager Application Server Control.
The baseHTML files (base.htm, basejini.htm, basejpi.htm, and baseie.htm) are used as templates by the Forms Servlet when generating the HTML page used to start up an Oracle Forms application.
We recommend that you make configuration changes in the formsweb.cfg file and avoid editing the baseHTML files. If you need to change the baseHTML files, create your own versions and reference them from the formsweb.cfg file by changing the appropriate settings.
This file allows you to configure Forms Trace. Forms Trace allows you to replace the functionality that was provided with Forms Runtime Diagnostics (FRD) and Performance Event Collection Services (PECS), which were available in earlier releases of Oracle Forms. Forms Trace allows you to trace the execution path through a form (for example, steps the user took while using the form).
You manage Forms Trace through Enterprise Manager Application Server Control.
For more information about ftrace.cfg, see Chapter 7, "Tracing and Diagnostics".
By default Forms Services is configured for OC4J by deploying it as a J2EE compliant application packaged in an EAR (Enterprise Archive) file called forms90app.ear. This EAR file is deployed during the Oracle Application Server installation process (if you choose to configure Oracle Forms). During deployment, the EAR file is unpacked into the applications directory of the OC4J instance.
This section describes:
Once Oracle Application Server Forms Services has been installed and configured, the web.xml file is located in the directory j2ee/OC4J_BI_FORMS/applications/forms90app/forms90web/WEB-INF underneath . It defines the aliases "f90servlet" and "l90servlet" for the Forms Servlet and the Forms Listener Servlet.
For more information about web.xml, see Chapter B.4, "web.xml".
During Oracle Application Server installation and configuration, the Forms EAR file (forms90app.ear) is deployed to the "OC4J_BI_FORMS" OC4J instance. This results in the following directory structure.
Names with a + sign are directories:
/j2ee/OC4J_BI_FORMS/applications/forms90app +META-INF
-application.xml (defines the structure of the ear file)
+forms90web
+WEB-INF
-web.xml (forms & listener servlet definitions, including servlet parameters) -orion-web.xml (virtual directory mappings and context parameter, only used in iDS) +lib -f90srv.jar (contains the Forms Servlet and Listener Servlet code)
This section describes the file used to configure Oracle HTTP Listener for Oracle Application Server Forms Services.
This is the Oracle HTTP listener configuration file for Oracle Application Server Forms Services. It is included into oracle_apache.conf, which in turn is included into httpd.conf (the master HTTP listener configuration file). Forms90.conf defines virtual directors (aliases) and servlet mount points to map URL requests to the Forms Servlets running in the OC4J servlet engine.
For more information about forms90.conf, see Chapter B.5, "forms90.conf".
This section describes the file used to configure font and icon settings for Oracle Application Server Forms Services.
This file allows you to change the default font, font mappings, and icons that Forms Services uses.
For more information about Registry.dat, see Chapter B.6, "Registry.dat".
Once you have created your application in Forms Developer, you are ready for application Web deployment. Oracle Application Server Forms Services accesses an application in Oracle Application Server through a specified URL. The URL then accesses the HTTP Listener, which communicates with the Listener Servlet. The Listener Servlet starts up a new Forms runtime process (ifweb90.exe on Windows or f90webm on Solaris) for each new Oracle Application Server Forms Services session.
For more information about how Forms Services run, see OracleAS Forms Services in Action.
To deploy a basic form with the default parameters set up by the installer:
.fmb is a design time file that can only be opened in Forms Developer. .fmx is the runtime file created when you compile the .fmb and is used for Web deployment.
For more information about Forms Developer, go to the Help menu in Forms Developer
my_application
application
hrapp.fmx
When configured, the Oracle Application Server Forms Services module hrapp.fmx will be accessible on the Web by entering ". config=my_application" in the Browser URL (the name of the Forms Web Configuration section in formsweb.cfg).
You can name the configuration section anything you want, as long as it does not include spaces.
To modify an environment file, select it in the Environment page of Enterprise Manager and add or edit environment variables as needed by your application. For example, you'd add the following environment variables for the previous example:
form
hrapp.fmx
If you specified these environment variables in a new environment file, you will need to specify this environment file in the respective Forms Web configuration section.
where "mymachine" is the name of your machine and "7777" is the port used by your HTTP Listener.
There are three ways to predefine parameter values for your Oracle Application Server Forms Services applications. You can define parameters by:
The default configuration section displays the default values that will be used by Oracle Application Server Forms Services.
For example, the default value of the system parameter that specifies how to execute the Forms applet under Microsoft Internet Explorer 5.x or above is defined as follows:
IE=JInitiator
If you want the Forms applet to run in the browser's native JVM, edit the parameter in the IE Value column to read:
native
and click Apply.
baseHTML
mybase.htm
baseHTMLjinitiator
mybasejini.htm
baseHTMLjpi
mybasejpi.htm
baseHTMLie
mybaseie.htm
form
myapp.fmx
userid
System Parameters cannot be overridden in the URL, while User Parameters can.
Under the configuration sections you created in step 2 of Deploying Your Application, you can specify parameters for your Oracle Application Server Forms Services applications. You can specify any application and system parameters that are available in the default section for Forms Web configuration.
For example, you can make the look and feel of the application to be the Oracle look and feel by setting the lookAndFeel parameter to the value of oracle and clicking Apply.
You can also override the default parameter values in the named configuration section. For example, to predefine the connect information of an application to scott/tiger@orcl, the parameter value for userid must be set in the named configuration section by changing the parameter value of userid to scott/tiger@orcl.
Parameters specified in the configuration section will override your application default settings.
You can directly type parameters into the URL that accesses your Oracle Application Server Forms Services application. Using the previous example, instead of specifying the pageTitle parameter in your configuration file, you could also type it into the URL as follows:
http://mymachine.com:7777/forms90/f90servlet?config=hr&pageTitle="My Company"You can use the ampersand (&) to call a combination of a form and named configuration parameters. For example, in the following URL:
http://mymachine.com:7777/forms90/f90servlet?config=ienative&form=hrapp
you are calling the form "hrapp" with the parameter settings you specified in "ienative".
Parameters specified in the URL will override parameters set in the configuration section. See Chapter 4.6, "Managing URL Security for Applications" for more information.
Certain considerations apply if values passed to runform parameters contain special characters. This section describes these considerations, and compares the default behavior in this release with the behavior in prior releases.
Runform parameters are those that are specified in the serverArgs applet parameter of the template HTML file. The value specified for the serverArgs parameter in the template HTML file, after variable substitution, is sometimes referred to as the command-line parameters string. It consists of a series of blank-separated name=value pairs. The name must consist solely of alphanumeric or underscore characters. The value portion of a name=value pair can be an arbitrary string.
The value of a runform parameter can be specified in one of three places:
For case (3), URL syntax rules (as enforced by the browser and the application server) require that certain characters be entered as URL escape sequences ('%' followed by 2 hex digits representing the ASCII value of the character, for a total of three characters).
This requirement includes the % character itself (which must be entered as %25 ). In addition, Oracle Application Server Forms Services currently requires that the quote character ('"') be entered as %22 , even if the browser and the application server allow a quote to be entered without escaping.
URL Syntax rules also allow a space to be entered as a + (as an alternative to the URL escape sequence %20 ). However in the value of the otherparams configuration parameter, a + is treated specially; it separates name=value pairs as opposed to indicating a space embedded in the value of a runform parameter.
For example, if a runform application has user parameters param1 and param2 , and you wish to assign them the values `a b' and `c d', you do so by incorporating the following into a URL:
&otherparams=param1=a%20b+param2=c%20d
When specifying runform parameters in the template HTML files of in the configuration files (cases (1) and (2)), Forms requires URL escape sequences in some circumstances, allows them in others, and forbids them in still others.
Outside of the values of runform parameters, URL escape sequences must not be used. For example, the = in a name=value pair must always be specified simply as = , and the space that separates two adjacent name=value pairs must always be specified simply as " " (a single space character).
Within the value of a runform parameter, space (' ') and quote ('"') must be specified as a URL escape sequence ( %20 and %22 , respectively). The HTML delimiter character (specified in the configuration file) must also be specified as a URL escape sequence.
Any other 7-bit ASCII character may also be specified as a URL escape sequence, although this is not required (except possibly for % , as noted below). Certain additional restrictions apply to the % character.
If the HTML delimiter is % (the default), then an occurrence of % within the value of a runform parameter must be escaped (specified as %25 ). (This actually follows from the requirement stated above, that the HTML delimiter character be escaped). Furthermore, variable names must never begin with two hex digits that represent a 7-bit ASCII value.
Put another way, variable names must never begin with two hex digits, the first of which is in the range 0-7. Put still another way, variable names must never begin with an octal digit followed by a hex digit.
If the HTML delimiter is not % , then an occurrence of % must be escaped if it's immediately followed by an octal digit and then a hex digit. It is recommended that other occurrences of '%' also be escaped; but this is not a requirement.
(You might choose to ignore this recommendation if you have existing template HTML files or configuration files created in prior releases, which use an HTML delimiter other than '%', and which contain '%' in runform parameter values).
Prior releases did not allow URL escape sequences in runform parameter values specified in the template HTML file or the configuration file (cases (1) and (2) above). In all 3 cases, it was difficult or impossible to specify certain special characters, notably space, quote, and apostrophe. Also, certain transformations were applied to the parameter value before passing it to runform. Most notably, if a value began and ended with an apostrophe, these were typically stripped off. However, these transformations were not well-defined, and they differed between the web and client/server environments.
If your applications are counting on the behavior of prior releases, you can obtain that behavior in the current release, by simply setting the value of the escapeparams variable to False in the configuration file (this can be accomplished using Enterprise Manager).
If you wish to obtain the old behavior only for selected applications, you can specify different values for the escapeparams variable in different configuration sections. Applications that require the old behavior can specify a configuration section in which the escapeparams variable is set to False ; applications that require (or will tolerate) the new behavior can specify a configuration section in which the escapeparams variable is set to True .
If you are creating your own template HTML files (or modifying existing ones, such as base.htm), then bear in mind the following:
It is recommended that a reference to the escapeparams variable (the string %escapeparams%, if '%' is the HTML delimiter character) appear at the beginning of the value of the serverArgs applet parameter, followed by a space. (See the shipped base.htm file for an example).
References to the escapeparams variable must appear nowhere else in the template HTML file.
It is permissible to omit the reference to the escapeparams variable from the beginning of the value of the serverArgs applet parameter, but then you will always obtain the behavior of prior releases, regardless of the value specified in the configuration file for the escapeparams variable.
If you are invoking the runform engine using static HTML, and you wish to obtain the new behavior, then you must take certain steps.
The basic rule is that your static HTML must look like the HTML generated by the Forms servlet. Specifically, the value of the serverArgs applet parameter must begin with the string escapeparams=true (case-insensitive).
Also, in the value portion of each name=value pair, in the value of the serverArgs applet parameter, certain characters must be specified by a URL escape sequence, as listed in Table 3-4: