![]() | ||
![]() |
There is no native way to integrate Oracle Forms into OracleAS Portal, meaning that there are no OracleAS Portal “specific features for integrating and administering Oracle Forms within OracleAS Portal. In order to accomplish Forms “to “OracleAS Portal integration, we have to use a technique similar to method #1 for integrating Reports (i.e., using the URL component in Portal). First, we need to make sure the Forms Server is up and running. If you look back at Figure 11-2, you ll see a component called Forms. If the status arrow is a check mark, we re up and running.
Note | One thing to notice about the Forms component: the check box next to the Forms component is grayed out. Normally, to stop, start, or restart a component, we select its check box and then click Start, Stop, or Restart in the right middle of the page. Why can t we do that with the Forms component? The Forms component is dependent on the OC4J_BI_FORMS component. When it s up, the Forms component is up; when it s down, the Forms component is down. So the next question becomes, if they re dependent on each other, why are there two of them? There are many reasons, but the most important one is that there are performance metrics associated with the Forms Server that allow administrators to see how efficiently the Forms Server is working. These metrics are viewable by clicking the Forms link. There is also a screen after you click the Forms link to view and modify the Forms Server configuration files. By separating these two components, administrators can get detailed information about both the OC4J_BI_FORMS and FORMS components of the Oracle Application Server 10g middle tier . |
To test your Forms Server, we re going to follow steps similar to when we tested the Reports Server. Point your browser to the Welcome page for the Application Server. If the infrastructure and middle tier are on the same machine, the port number is probably 7778. If they are on separate machines, the port number is probably 7777:
http://<Middle-tier server>:<port>
You should see a page similar to Figure 11-4. Click the Demonstrations tab, then the Business Intelligence And Forms link, then the Forms Services link next to the text that starts Demonstrates a test form.... If this is the first time you re attempting to run an Oracle Form, you will be prompted to install a browser plug-in called Jinitiator.
Note | Oracle JInitiator enables users to run Oracle9i Forms applications using Netscape Navigator or Internet Explorer. It provides the ability to specify the use of a specific Java Virtual Machine (JVM) on the client, rather than using the browser s default JVM. Oracle JInitiator runs as a plug-in for Netscape Navigator and as an ActiveX component for Internet Explorer. Oracle JInitiator does not replace or modify the default JVM provided by the browser. Rather, it provides an alternative JVM in the form of a plug-in. To get more information about JInitiator, refer to Oracle Application Server Forms Services Deployment Guide 10g (9.0.4), Oracle Part Number B10470-01, Appendix A. |
After JInitiator installs , you should see a new browser window similar to Figure 11-11.
Unlike the URL we used to run our first report, the URL to run our form seems pretty innocuous :
http://xpas10g:7778/forms90/f90servlet
Not much sensitive information you can get from the address in Figure 11-11, is there? But how do we specify what form we want to run and what characteristics we want to specify? Here s where Oracle is throwing you a bit of a curve ball. The demo to run a test report does not use a keymap entry (we saw all of the report s details in the URL), but the demo to run a form does use a keymap entry, even though there doesn t appear to be one specified.
Oracle Forms, like Oracle Reports, uses a keymap file, only for Oracle Forms, it s called the Forms Servlet Configuration File. It serves the exact same purpose as the Oracle Reports keymap file: namely, it hides sensitive details about the Oracle Form from the user s eyes in the URL of the browser. The Forms Servlet Configuration File is called formsweb.cfg and is located in <middle_tier_home>/forms90/server. The formats of the files are different, but the concept is the same: a key that will be referenced in the URL of the browser, followed by attributes that will determine what form is run and how the Forms Server is run for that particular Oracle Form. In Oracle s documentation, the keys in the formsweb.cfg file are called named configurations.
In the cgicmd.dat file for the Reports Server, the entries had this format:
key: attribute1 attribute2 etc.
In the formsweb.cfg file for the Forms Server, the entries have this format:
[named configuration] attribute1 attribute2 etc.
See Chapter 4 of the Oracle Application Server Forms Services Deployment Guide 10 g (9.0.4) for a complete list of the parameters that can be specified. The most common parameters are specified in Table 11-2.
Parameter | Required / Optional | Parameter Value |
---|---|---|
baseHTML | Required | The default base HTML file. |
baseHTMLJInitiator | Required | Physical path to HTML file that contains JInitiator tags. |
connectionDisallowedURL | Required | This is the URL shown in the HTML page that is not allowed to start a new session. |
IE | Recommended if there are users with Internet Explorer 5.0 or above browsers | Specifies how to execute the Forms applet under Microsoft Internet Explorer 5.0 or above. If the client is using an Internet Explorer 5.0 or above browser, either the native JVM or JInitiator can be used. A setting of JInitiator uses the basejini.htm file and JInitiator. A setting of Native uses the browser's native JVM. |
log | Optional | Supports running and debugging a form from the Builder. Default value is Null. |
form | Required | Specifies the name of the top-level Forms module (fmx file) to run. |
userid | Optional | Login string. For example: scott/tiger@ORADB. |
otherparams | Optional | This setting specifies command-line parameters to pass to the Forms run-time process in addition to form and userid. |
Default is | ||
otherparams=buffer_records=%buffer% | ||
Note: Special syntax rules apply to this parameter when it is specified in a URL: a + may be used to separate multiple name=value pairs (see Section 3.3.4, Specifying Special Characters in Values of Runform Parameters in the Oracle Application Server - Forms Services Deployment Guide (http://download-west.oracle.com/docs/cd/B10464_01/ web.904/b10470/basics.htm ) for more information). | ||
For production environments, in order to provide better control over which runform parameters end users can specify in a URL, use the restrictedURLparams parameter. | ||
debug | Optional | Allows running in debug mode. |
buffer | Optional | Supports running and debugging a form from the Builder. |
Log | Optional | Supports running and debugging a form from the Builder. |
pageTitle | Optional | HTML page title, attributes for the BODY tag, and HTML to add before and after the form. |
serverURL | Required | /forms90/l90servlet (see Chapter 1, Oracle Application Server ”Forms Services Deployment Guide (http://download-west.oracle.com/docs/cd/B10464_01/ web.904/b10470/intro.htm) for more information). |
codebase | Required | Virtual directory you defined to point to the physical directory <ORACLE_HOME>/forms90/java, where, by default, the applet JAR files are downloaded from. |
ImageBase | Optional | Indicates 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. | ||
Logo | Optional | Specifies the .GIF file that should appear at the Forms menu bar. Set to NO for no logo. Leave empty to use the default Oracle logo. |
Width | Required | Specifies the width of the form applet, in pixels. Default is 650. |
Height | Required | Specifies the height of the form applet, in pixels. Default is 500. |
SeparateFrame | Optional | Determines whether the applet appears within a separate window. Legal values: True or False. |
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 image. |
To set the parameter, include the filename (for example, myfile.gif) or the virtual path and filename (for example, images/myfile.gif). | ||
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. |
LookAndFeel | Optional | Determines the application s look and feel. Legal values: Oracle or Generic (Windows look and feel). |
Jinit_download_page | Required (Netscape only) | If you create your own version of the Jinitiator download page, set this parameter to point to it. Default is /forms90/jinitiator/us/Jinitiator/jinit.download.htm. |
jinit_classid | Required (IE only) | Default is clsid : |
jinit_exename | Required | Default is jinit.exe#Version=1.3.1.9 |
jinit_mimetype | Required (Netscape only) | Default is application/x-jinit-applet;version=1.3.1.9 |
baseHTMLJInitiator | Required | Physical path to HTML file that contains JInitiator tags. |
jpi_codebase | Required | Sun's Java Plug-in codebase setting. |
jpi_classid | Required | Sun's Java Plug-in class ID. |
jpi_download_page | Required | Sun's Java Plug-in download page. |
em_mode | Required | 1 is to enable. 0 is to disable. |
1 indicates that all Enterprise Manager information is available, including metrics and servlet status. 0 indicates that only configuration information is available. | ||
oid_formsid | Required | Configured during the OracleAS installation, so you do not need to change this. |
ORACLE_HOME | Required | Configured during the OracleAS installation, so you do not need to change this. |
The URL for the Reports Server to read the cgicmd.dat file looks like this:
http://<server name>:<port>/reports/rwservlet?key
The URL for the Forms Server to read the formsweb.cfg file looks like this:
http://<server name>:<port>/servlet/f90servlet?config=named configuration
Wait a minute ”the demo form that is displayed in Figure 11-11 did not have a config= at the end of the URL. How did the Forms Server know what Oracle Form to display? At the beginning of the formsweb.cfg file, there is a default configuration section. Parameters specified in this section are used unless they are overridden by any named configurations referenced in the file. Since we didn t reference any, the default parameters were used. One of the default parameters is
Form=test.fmx
We could have specified a named configuration like this:
[test_form] form=test.fmx
and then specified the URL like this:
http://xpas10g:7778/servlet/f90servlet?config=test_form
Here s a strange quirk. Try this:
http://xpas10g:7778/servlet/f90servlet?config=bogusbogusbogus
Now, bogusbogusbogus does not exist in the formsweb.cfg file, yet the form gets displayed with no error message. Why? Remember that the named configurations override any parameters specified in the default configuration section. Since bogusbogusbogus isn t in the formsweb.cfg file, the values from the default configuration are used (including the one that says form=test.fmx ). This is why it s a good idea to comment out the form= parameter in the default configuration section or redirect users and developers to a help page. As in the case of the cgicmd.dat file, if you make any changes to the formsweb.cfg file, you must bounce the OC4J_BI_FORMS component before any changes will take effect.
Integrating the Oracle Form into OracleAS Portal is as simple as creating a URL object and performing the steps we did in the section Reports Integration Method #1: Using the Portal URL Component earlier in this chapter. The URL
http://xpas10g:7778/servlet/f90servlet?config=<named configuration>
can be used to construct the OracleAS Portal component (a URL component) that can then be placed on an OracleAS Portal page. Assuming you ve already created a Database Provider in OracleAS Portal (if not, review 9), go into that provider and create a new URL component. Give it a name that is easily remembered . For this example (Figure 11-12), I used the name test_form_url. On the second step of the wizard, enter the URL from above (http://xpas10g:7778/servlet/f90servlet?config=<named configuration>). When we get to the next step in this process, we ll use this URL component and place it on a page.
Click Finish and then Run As Portlet on the component summary page. You should see the form in your web browser. Click the Access tab on the component summary page and make sure Publish To Portal is checked. You can now place this portlet on an OracleAS Portal page.
![]() | ||
![]() |