![]() |
Pramati Server 3.5 Online Help |
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.
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/
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/
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.
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:
|
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.
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:
The configuration file is generated when you start the Server instance for the first time. To modify the configuration, stop the Server.
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:
Enter these virtual path-directory mappings in the Pramati Server configuration file using these tags:
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>
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.
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 *************************** {} *************************
Oracle Forms Server should be running as a service on the localhost machine where Pramati Server is running.
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.
A sample, which demonstrates web-based Forms running Pramati Server, can be downloaded from http://www.pramati.com. To install the sample:
Open a browser and type the following URL:
This will launch a webpage where the details form must be entered:
Note: Ensure that the OFS is connected to the configured database.
"Run" will display the demo form in a new webpage.
Open a browser and key in the URL http://localhost:8181/form/runrep.htm.
"Run" will display the demo report in a new webpage.
During the installation, the following configuration files are installed:
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.
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.
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.
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.
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>
To view Oracle JInitiator output:
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.
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
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>
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:
To modify the cache size for Oracle JInitiator:
To modify the heap size for Oracle JInitiator:
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:
When deploying Forms for the web, certain features may behave differently or not at all.
Name of the file: formsweb.cfg
Location: <ORACLE_HOME>\FORMS60\server\
All of the following can be specified in the base HTML file as %variablename%. For example:
All variables in the base HTML file are replaced with the appropriate parameter values specified in the formsweb.cfg file.
Pramati Technologies © Copyright |
Pramati Server 3.5 Online Help |