Pramati Technologies Pramati Server 3.5 Online Help

Web-enabling Oracle Forms Application

This section provides information for developers who want to make Oracle Forms applications accessible over the web using Pramati Server. Information contained here is for Oracle Forms version 6i and Pramati Server version 3.0 or higher.

Deploying Forms applications to the web on Pramati Server has benefits:

Pramati Server plug-in can work with one or more instances of Oracle Forms Server. Pramati Server extends the benefits of dynamic cache services and transparent load balancing to Forms users over the web.

Requirements

Installation

Pramati Server and Oracle Forms Server must be installed on the same machine. For information on installing the products, refer the documents:

http://www.pramati.com/developer/res_psv30.htm

http://otn.oracle.com/documentation/6i_forms.html/

Standard Java plug-in or JInitiator

JInitiator is a Java plug-in that ships with Oracle Forms Server, and provides extra caching and performance enhancements. However, the standard Java plug-in with the browser can be used to run the forms. More information on JInitator is available at http://www.oracle.com/

Oracle Forms Server as Service

This document assumes that Oracle Forms Server is installed and running as an NT Service on Windows or a daemon on Unix and Linux.

Note: Before running the forms, ensure that the OFS is connected to the configured database.

Configuring and Starting Pramati Server

For the purpose of this document, we will use the Default configuration of Pramati Server. The Default configuration of Pramati Server on your local host machine has these basic properties:

Table 1: Properties of Pramati Server Default configuration
Property
Value
Server name
Default
Host
localhost
Lookup Port
9191
HTTP Port
8181
User name
root
Password
pramati
Realm
system

You can replicate all steps described here on any other instance of Pramati Server.

Pramati Server Configuration file

To configure Pramati Server to run with Oracle Forms Server, modify the server-config.xml of the Default Server. The runtime configuration properties for the Default instance of Pramati Server is stored in the server-config.xml, which is located at:

<install_dir>\nodes\Default\config\ 

The configuration file is generated when you start the Server instance for the first time. To modify the configuration, stop the Server.

Adding Forms virtual paths to Pramati Server configuration file

Forms virtual paths (aliases) map to physical directories created by the Oracle installation. These directories contain files required by Forms. The names of the virtual paths are as specified in the Oracle Forms Server documentation. The mappings are listed in the table:

Table 2: Oracle Forms Server virtual path entries in Pramati Server server-config.xml
Virtual path
Physical directory
Description
/forms60java/
<ORACLE_HOME>\forms60\java\
Forms Java files
/dev60html/
<ORACLE_HOME>\tools\web60\html\
Starter HTML files for running Forms
/dev60cgi/
<ORACLE_HOME>\tools\web60\cgi\
CGI executables
/Jinitiator/
<ORACLE_HOME>\jinit\
JInitiator (for download)
/dev60temp/
<ORACLE_HOME>\tools\web60\temp\
Forms temporary files

Enter these virtual path-directory mappings in the Pramati Server configuration file using these tags:

Table 3: Tags that refer to Oracle Forms in server-config.xml
Tags
Sub-tag 1
Sub-tag 2
Description
<cgi>
 
 
Location of scripts and executables and specifies properties
 
<enable>
 
This may be true or false. To enable or disable the CGI plug-in
 
<cgi-alias>
 
Maps virtual paths to physical directories
 
 
<alias-name>
Virtual path
 
 
<alias-directory>
Physical directory
 
<script-alias>
 
Maps virtual paths to executable scripts
 
 
<script-name>
Virtual name
 
 
<script-directory>
Physical directory of the executable
 
<property>
 
Properties or parameters used by executable
 
 
<name>
Property name
 
 
<value>
Property value

Note: These tags can be copied from the Pramati Server configuration template which is in <PRAMATI_HOME>\server\templates\server-config.xml.

Here is an entry in the server-config.xml using sample physical directories of Oracle 6i Forms Server:

<cgi> 
	<enable>true</enable> 
	<cgi-alias> 
		<alias-name>/forms60java</alias-name> 
		<alias-directory>D:/orant/forms60/java</alias-directory> 
	</cgi-alias> 
	<cgi-alias> 
		<alias-name>/dev60html</alias-name> 
		<alias-directory>D:/orant/tools/web60/html</alias-directory> 
	</cgi-alias> 
	<cgi-alias> 
		<alias-name>/dev60temp</alias-name> 
		<alias-directory>D:/orant/tools/web60/temp</alias-directory> 
	</cgi-alias> 
	<cgi-alias> 
		<alias-name>/jinitiator</alias-name> 
		<alias-directory>D:/orant/jinit</alias-directory> 
	</cgi-alias> 
	<script-alias>  
		<script-name>/dev60cgi</script-name>  
		<script-directory>D:/orant/tools/web60/cgi/</script-directory>  
	</script-alias>  
	<property>  
		<name>path</name>  
		<value>D:\orant\bin</value>  
		<mode>add</mode>  
	</property> 
	<property>  
		<name>system_root</name>  
		<value>C:\WINNT40</value>  
		<mode>replace</mode>  
	</property> 
	<property>  
     		<name>system_drive</name>  
		<value>C:</value>  
		<mode>replace</mode>  
	</property> 
</cgi> 

Starting Pramati Server

Start Pramati Server by running runserver.bat (or the shell script file runserver.sh on Unix). This file is located in <PRAMATI_HOME>\server\bin\.

Note: Using the -shell option will start Server in a Server Shell, which provides a command line for executing tasks interactively on the Server.

Starting the Forms Plug-in in debug mode

The Server can be started in the debug mode by running runserver.bat (or the shell script file runserver.sh on Unix) with the -DcgiDebug option. Starting the Server this way will output CGI configuration details in the command window. For example:

*************************ScriptAliasMAp is *************************** 
{dev60cgi=d:/orant/tools/web60/cgi}  
*************************AliasMap is *************************** 
{}  
************************* 

Running Forms from Pramati Server

Oracle Forms Server should be running as a service on the localhost machine where Pramati Server is running.

Locating Forms HTML page under default docroot on Pramati Server

The directory <PRAMATI_HOME>/server/nodes/default/archives/public_html/, serves as the public document root on Pramati Server. Files placed here inside a directory can be accessed by simply giving the directory name as the context root in the URL.

Installing a sample form for easy access on Pramati Server

A sample, which demonstrates web-based Forms running Pramati Server, can be downloaded from http://www.pramati.com. To install the sample:

  1. Extract the zip under <PRAMATI_HOME>/server/nodes/default/archives/public_html/. This will create a directory /forms.
  2. This directory contains the files run.htm, runreport.htm, pramati.fmx, and pramati.jpg.
  3. Copy the Pramati demo form, pramati.fmx, to <ORACLE_HOME>\FORMS60. You can find the exact location for your local Oracle Form installation in the system registry entry under HKEY_LOCAL_MACHINE > SOFTWARE > ORACLE.
  4. Also copy Pramati demo sample reports, pramati.rdf to <ORACLE_HOME>\REPORTS60. You can find the exact location for your local Oracle Reports installation in the system registry entry under HKEY_LOCAL_MACHINE > SOFTWARE > ORACLE.

Running the sample form and report

Open a browser and type the following URL:

http://localhost:8181/forms/run.htm 

This will launch a webpage where the details form must be entered:

Table 4: Specifying the Form to be accessed via Pramati Server
Field
Value/Description
Form name
pramati.fmx
userid
The username, password and SID. Example: scott/tiger@db1
Look and feel
Generic or Oracle
Color scheme
Choose from a set of colors specified in formsweb.cfg
Web host
The name of the host where Pramati Server is running
Web port
The HTTP port. For Default server, this is 8181

Note: Ensure that the OFS is connected to the configured database.

"Run" will display the demo form in a new webpage.

Running Reports

Open a browser and key in the URL http://localhost:8181/form/runrep.htm.

Table 5: Specifying the Report to be accessed via Pramati Server
Field
Value/Description
Reports Server
Report Server name (typically Rep60_<hostname>)
Report
Name of the Report (repemp.rdf)
userid
username/password@SID (scott/tiger@db1)
DesType
cache
DesFormat
HTML/PDF
Web host
Machine where Pramati Server is running (localhost)
Web port
Port on which Pramati Server is running (8181)

"Run" will display the demo report in a new webpage.

Configuring Oracle Forms Server

During the installation, the following configuration files are installed:

Table 6: Oracle Forms Server configuration files
Configuration file
Location
Description
formsweb.cfg
<ORACLE_HOME>\FORMS60\
Contains all configurable properties of Oracle Forms
base.htm and basejini.htm
<ORACLE_HOME>\FORMS60\
Contains Java plug-in information and look-and-feel properties

Configuration files created by the Oracle Installer reflect the configuration options that you selected in the installation dialog boxes. You can modify the configuration files. The files are located in the <ORACLE_HOME>\FORMS60\server directory after installation.

When you first start a web-enabled application (by clicking a link to the application's URL), the base HTML file is read by the Forms runtime. Any variables (%variablename%) in the base HTML file are replaced with the appropriate parameter values specified in the formsweb.cfg file and from query parameters in the URL request, if any.

The complete list of configurable properties in formsweb.cfg are listed at the end of the document.

Configuring JInitiator as the Java plug-in

When Oracle Forms Server installs, JInitiator is setup as the default Java plug-in for the browser. The following entry in formsweb.cfg specifies how to execute the Forms applet under Microsoft Internet Explorer 5.0.

IE50=JInitiator 

Use IE50=native if you want Forms applet to run in the browser's native JVM.

If the client machine accessing the form does not have JInitiator installed, the plug-in will install itself first. This is similar to how Java Web Start works.

The Java plug-in to be used by the browser can be changed by modifying the starter HTML files. The following base HTML starter files are available in the \<FORMS60>\server directory. Copy the contents of basejini.htm into base.htm.

Jinitiator starter HTML (basejini.htm)

This is a base HTML file containing the tags required to run the Forms applet using Oracle JInitiator. It is suitable for browsers (only on Windows platforms) certified by Oracle to work in this manner (and which do not work using standard APPLET tags). See Oracle JInitiator documentation more information about JInitiator settings.

Standard Java plug-in starter HTML (base.htm)

This is a base HTML file containing the APPLET tags required to run the Forms applet in the AppletViewer, or in any Web browser certified by Oracle whose native JVM is certified with Forms. See Oracle documentation for more information on AppletViewer settings.

The JInitiator plug-in is specified in basejini.htm as shown here:

<OBJECT classid="%jinit_classid%" 
	codebase="/jinitiator/%jinit_exename%" 
	WIDTH="%Width%" 
	HEIGHT="%Height%" 
	HSPACE="0" 
	VSPACE="0"> 
<PARAM NAME="TYPE"       VALUE="%jinit_mimetype%"> 
<PARAM NAME="CODEBASE"   VALUE="/forms60java/"> 
<PARAM NAME="CODE"       VALUE="oracle.forms.engine.Main" > 
<PARAM NAME="ARCHIVE"    VALUE="%archive%" >  
 
<PARAM NAME="serverPort" VALUE="%serverPort%"> 
<PARAM NAME="serverHost" VALUE="%serverHost%"> 
<PARAM NAME="connectMode" VALUE="%connectMode%"> 
<PARAM NAME="serverArgs"  
       VALUE="module=%form% userid=%userid% %otherParams%"> 
<PARAM NAME="separateFrame" VALUE="%separateFrame%"> 
<PARAM NAME="splashScreen"  VALUE="%splashScreen%"> 
<PARAM NAME="background"  VALUE="%background%"> 
<PARAM NAME="lookAndFeel"  VALUE="%lookAndFeel%"> 
<PARAM NAME="colorScheme"  VALUE="%colorScheme%"> 
<PARAM NAME="serverApp" VALUE="%serverApp%"> 
<COMMENT>  
<EMBED SRC="" PLUGINSPAGE="%jinit_download_page%"  
	TYPE="%jinit_mimetype%"  
	java_codebase="/forms60java/"  
	java_code="oracle.forms.engine.Main"  
	java_archive="%archive%"  
	WIDTH="%Width%" 
	HEIGHT="%Height%"  
	HSPACE="0" 
	VSPACE="0" 
 
	serverPort="%serverPort%" 
	serverHost="%serverHost%" 
	connectMode="%connectMode%" 
	serverArgs="module=%form% userid=%userid% %otherparams%" 
	separateFrame="%separateFrame%" 
	splashScreen="%splashScreen%" 
     	background="%background%" 
	lookAndFeel="%lookAndFeel%" 
	colorScheme="%colorScheme%" 
	serverApp="%serverApp%" 
> 
<NOEMBED>  
</COMMENT>  
</NOEMBED></EMBED>  
</OBJECT> 
Viewing Oracle JInitiator output

To view Oracle JInitiator output:

  1. From the Start menu, choose Start > Programs > Oracle JInitiator > Control Panel.
  2. Click the Basic tab.
  3. Check the Show Java Console check box to enable debug output.
Why use JInitiator as the preferred Java plug-in

Users can view Forms applications through a browser using the Oracle JInitiator, instead of the standard Java plug-in provided by the JDK. Oracle documentation recommends the use of JInitiator.

Oracle JInitiator delivers a certified, supportable, Java Runtime Environment (JRE) to client desktops, which can be launched transparently through a Web browser. Oracle JInitiator is Oracle's version of JavaSoft's Java Plug-in. The JavaSoft Plug-in is a delivery mechanism for a JavaSoft JRE, which can be launched from within a browser.

Likewise, Oracle JInitiator is providing a delivery mechanism for an Oracle certified JRE, which enables Forms Developer applications to be run from within a browser in a stable and supported manner.

In addition to providing a certified platform for the execution of Forms Developer applications, Oracle JInitiator provides a number of additional features over and above the standard JavaSoft Java Plug-in. These include JAR file caching, incremental JAR file loading, and applet caching.

Using multi-lingual forms

To compose forms in languages that use other font sets, the font properties must be modified in the file font.properties. This file is located in <ORACLE_HOME>\JRE11\lib. Shown below is a revised entry in the properties file for using Thai language fonts:

dialog.0=ThaiProp,DEFAULT_CHARSET

Performance enchancements

Enabling Pramati Server Dynamic Cache

Pramati Server provides dynamic cache service. To cache all static content returned by Oracle Form-related requests, move <alias></alias> entries out of the <cgi></cgi> tag in the server-config.xml. URL entries inside <cgi></cgi> tag are not cached.

Note: <script-alias> is kept inside the <cgi></cgi> tag as the CGI script must be executed on every request, and not cached.

The modified server-config.xml looks like this:

<alias> 
	<alias-name>/forms60java</alias-name> 
	<alias-directory>D:/orant/forms60/java</alias-directory> 
</alias> 
<alias> 
	<alias-name>/dev60html</alias-name> 
	<alias-directory>D:/orant/tools/web60/html</alias-directory> 
</alias> 
<alias> 
	<alias-name>/dev60temp</alias-name> 
	<alias-directory>D:/orant/tools/web60/temp</alias-directory> 
</alias> 
<alias> 
	<alias-name>/jinitiator</alias-name> 
	<alias-directory>D:/orant/jinit</alias-directory> 
</alias> 
<cgi> 
	<enable>true</enable> 
	<script-alias>  
		<script-name>/dev60cgi</script-name>  
		<script-directory>D:/orant/tools/web60/cgi/</script-directory>  
	</script-alias>  
	<property>  
		<name>path</name>  
		<value>D:\orant\bin</value>  
		<mode>add</mode>  
	</property> 
	<property>  
		<name>system_root</name>  
		<value>C:\WINNT40</value>  
		<mode>replace</mode>  
	</property> 
	<property>  
     		<name>system_drive</name>  
		<value>C:</value>  
		<mode>replace</mode>  
	</property> 
</cgi> 

Optimizing JInitiator start-up parameters

The start-up parameters for Jinitiator impact performance:

Render read-only items in grey. Set READONLYBACKGROUND=TRUE

Optimizing JInitiator cache and heap size

To modify the Oracle JInitiator plug-in:

Modifying cache size for Oracle JInitiator

To modify the cache size for Oracle JInitiator:

  1. From the Start menu, choose Start > Programs > Oracle JInitiator > Control Panel.
  2. Click the Basic tab.
  3. In the Java Run Time Parameters field, specify the Dcache size. For example, specifying Dcache.size=20000000 sets the cache size to 20MB. The default cache size for Oracle JInitiator is 20000000, which is set when you install Oracle JInitiator.
Modifying heap size for Oracle JInitiator

To modify the heap size for Oracle JInitiator:

  1. From the Start menu, choose Start > Programs > Oracle JInitiator > Control Panel.
  2. Click the Basic tab.
  3. In the Java Run Time Parameters field, specify the mx size. For example, specifying mx64m means setting maximum heap size to 64MB. The default maximum heap size for Oracle JInitiator is 64MB, which is set when you install Oracle JInitiator.

Optimizing design of forms for web

The web-enabled Forms will be finally rendered by a Java application. Therefore it helps to reduce the number of GUI components. Remember that running a browser and a Java plug-in is not trivial and can stress resources on the client machine. The following optimizations will impact performance of Forms over the web:

Restrictions when web-enabling Forms

When deploying Forms for the web, certain features may behave differently or not at all.

Table 7: Feature restriction when deploying Forms for the web
Feature
Support
Guidelines and Notes
ActiveX, OCX, OLE, VBX
No
Third-party controls that display screen output on the application server are not supported because users cannot view the output.
When-Mouse-Enter / Leave / Move triggers
No
Each execution of the trigger requires a network roundtrip, which would downgrade performance.
console
Yes
To display the console (includes the status and message lines) to users, set the form-level property Console Window to the window in which you wish to display the console.
firewall
Yes
You must run Forms Server in HTTP or HTTPS mode and have a firewall supporting HTTP 1.1. protocol.
HOST_COMMAND, ORA_FFI, USER_EXIT
Yes
Calls to these functions often display visual output or GUI elements on users' machines in client/server mode. In a Web implementation, the same calls will display the output and GUI elements on the application server (where users cannot see or interact with them).
ICO format for icons
No
Icon image files must be in GIF format (and not in ICO format).
NLS, BIDI
Yes
Supported for 8-bit languages only.

Oracle Forms Server configuration file

Name of the file: formsweb.cfg

Location: <ORACLE_HOME>\FORMS60\server\

Basic parameters

Table 8: Oracle Forms Server configuration parameters / Basic
Parameter
Required/Optional
Parameter Value
baseHTML
required
Physical path to HTML file that contains applet tags.
baseHTMLJInitiator
required
Physical path to HTML file that contains JInitiator tags.
ie50
recommended if there are users with Internet Explorer 5.0 browsers
If the client is using the Internet Explorer 5.0 browser, either JInitiator or AppletViewer can be used. A setting of "JInitiator" uses the basejini.htm file and JInitiator. A setting of "Native" uses the browserís native JVM.
HTML delimiter
required
Delimiter for variable names. Defaults to %.
MetricsServerHost
optional
For load balancing.
MetricsServerPort
optional
For load balancing.
MetricsServerErrorURL
optional
For load balancing.
MetricsTimeout
optional
For load balancing.
leastloadedhost
optional
For load balancing. This is a variable that can be specified in either the base HTML file or the formsweb.cfg file, wherever the name of the least loaded machine is required for load balancing. If you use the default base HTML file, which is recommended, then be sure to specify serverHost=%loastloadedhost% in the formsweb.cfg file when load balancing is being used. During load balancing, this placeholder is replaced dynamically with the name of the least-loaded system.

Runform parameters (serverArgs parameters)

Table 9: Oracle Forms Server configuration parameters / Runform
Parameter
Required/Optional
Parameter Value
MODULE
required
Form module name (optionally includes path).
USERID
optional
Login string, such as scott/tiger@ORA8.
user-defined parameters
optional
Arbitrary name/value pairs.

Standard applet or object parameters

All of the following can be specified in the base HTML file as %variablename%. For example:

<PARAM NAME="connectMode" VALUE="%connectMode%"> 

All variables in the base HTML file are replaced with the appropriate parameter values specified in the formsweb.cfg file.

Table 10: Oracle Forms Server configuration parameters / Standard applet
Parameter
Required/Optional
Parameter Value
codebase
required
Virtual directory you defined to point to the physical directory <ORACLE_HOME>\forms60\java.
code
required
Do not remove or modify the code parameter. Its value should always be: oracle.forms.engine.Main.
connectMode
required for HTTP and HTTPS connections; optional for socket connection
Specifies to the client the type of connection protocol to use with the Forms Server. Valid values are socket, http, and https. The default is socket.
archive
optional
Comma-separated list of archive files to preload. Paths, if not absolute, are relative to codebase.
width
required
Specifies the width of the Form, in pixels.
height
required
Specifies the height of the Form, in pixels.
align
optional
left|center|right|top|middle|bottom
alt
optional
Text displayed instead of applet (if browser does not support applets)
hspace
optional
Horizontal gutter, in pixels.
vspace
optional
Vertical gutter, in pixels.
type
required
Hard coded value ("application/x-jinit-applet" for JInitiator; no value required for AppletViewer).
name
optional
Applet instance name.
title
optional
Advisory title string.
border
optional
Border to display.
standby
optional
Text to display when loading.
codetype
optional
Defaults to type.

Parameters specific to Forms applet (in PARAM tags)

Table 11: Oracle Forms Server configuration parameters / Form applet
Parameter
Required/Optional
Parameter Value
serverHost
optional
Host on which the Forms Server, ifsrv60.exe runs (defaults to Web listener machine).
serverPort
required
Port on which the Forms Server, ifsrv60.exe listens. In most cases, the port number will remain 9000 (the default).
serverArgs
required
Command-line parameters for Runform. See Runform parameters below. Replace forms_param with any valid Form Runtime command-line parameter.
Replace user_param with any valid user-defined parameter. For example, <param name="serverArgs" VALUE="module=order.fmx">.
Notes: You can provide multiple Form Runtime command-line and user-defined parameters. You must provide a physical directory path for the .FMX file by including a directory path by defining the FORMS60_PATH environment variable. The .FMX suffix is optional.
splashScreen
optional
Specifies the .GIF file that should appear before the applet appears. Set to NO for no splash. Leave empty to use the default splash.
background
optional
Specifies the .GIF file that should appear in the background. Set to NO for no background. Leave empty to use the default background.
clientDPI
optional
Specifies the dots per inch (DPI) and overrides the DPI setting returned by the JVM, allowing you to manage varying DPI settings per platform. For example, a form developed on the Win32 platform may not display properly on the UNIX platform due to varying DPI values. The clientDPI value can be any positive integer. Oracle recommends that you use an integer between 50 and 200. <param name="clientDPI" value="200">.
separateFrame
optional
Determines whether the applet appears within a separate frame. Legal values: True or False.
lookAndFeel
optional
Determines the applications look-and-feel. Legal values: Oracle or Generic (Windows 95 look-and-feel).
colorScheme
optional
Determines the application's color scheme. Legal values: Teal, Titanium, Red, Khaki, Blue, Olive, or Purple. Note: colorScheme is ignored if lookAndFeel is set to Generic.
serverApp
optional
Replace default with the name of your application class (if any). Use application classes for creating application-specific font mapping and icon path settings.
heartBeat
optional
Use this parameter to set the frequency at which a client sends a packet to the server to indicate that it is still running. Define this integer value in minutes. The default is two minutes.
imageBase
optional
Use this parameter to indicate where icon files are stored. Choose between:
codeBase, which indicates that the icon search path is relative to the directory that contains the Java classes. Use this value if you store your icons in a JAR file (recommended).
documentBase, which is the default. In deployments that make use of the Forms Server CGI, you must specify the icon path in a custom application file.
registryPath
optional
Use this parameter to list the virtal directory where the application file named in the serverApp parameter is located.
webformsTitle
optional
Use this parameter to change the title that appears in the top border of a form's display window.


Pramati Technologies  © Copyright

 Pramati Server 3.5 Online Help