This document contains the steps to install the Oracle Forms Demos into your environment. The Forms Demos contain sample applications designed to show various features of Forms. The original source code is included so they can serve as a basis from which you may utilize the same features in your applications. The document is made with the assumption that FMw11g is installed in C:\Oracle\Middleware
Currently, you will need to follow the manual steps in this guide to install the Forms Demos. In a future release, a script or installation program will be supplied to minimize the number of manual steps needed.
2 Install the demo data
2a Modify the database scripts
2b Run the database scripts
2c Verify the demo data
3 Modify the WLS_FORMS configuration
3a Modify weblogic.xml
3b Modify web.xml
3c Verify the changes
4 Modify the Forms configuration file
4a Add application sections
4b Modify variables
5 Add the HTML files and the Forms demo environment file
5a Copy the files
5b Modify the Forms demo environment file
5c Check the length of FORMS_PATH
Appendix 1 - Starting WLS_FORMS
The version number shown here is for the Forms Demos as a whole, and is not connected to the version of any particular Oracle software. As new demos get added over time the Forms Demos package will be updated, along with the version number. That way, in the future if you download the Forms Demos again, you can compare the version number to see if there have been any changes.
Please feel free to provide feedback on your experience with the Forms Demos on the Forms forum on OTN:
You must have the following installed and working before you start:
Future releases of these Forms Demos will be installable into an Oracle Application Server or into an Oracle Developer Suite home on a non-Windows platform. Keep checking http://otn.oracle.com/sample_code/products/forms/index.html for updates.
%STAGE_HOME% represents the location where you unzipped the Forms Demos (and from where you're probably reading this guide). Wherever you see %STAGE_HOME% in this guide, you should replace it with location of where you unzipped the Forms Demos. e.g. C:\Temp\OracleDemos.
%ORACLE_HOME% represents the location where Oracle FMw 11g is installed. Wherever you see %ORACLE_HOME% in this guide, you should replace it with your Oracle Home. e.g. C:\Oracle\Middleware\as_1.
Follow these steps to install the Forms Demos.
Copy %STAGE_HOME%\demos to %ORACLE_HOME%\forms.
Make sure you copy the directory itself, not just the contents. You want to end up with %ORACLE_HOME%\forms\demos, including all of its contents.
Before installing the database components, the scripts need to be modified for your environment.
Using a text editor, open the following file:
%ORACLE_HOME%\forms\demos\sql\demoinstall.bat
Near the top of the file are several variables whose values you should set:
There are comments for each variable to help you. Be sure to save the file before continuing.
This step will install the database components of the demos.
Run %ORACLE_HOME%\forms\demos\sql\demoinstall.bat from the command line, or by double-clicking it in Windows Explorer. There may be warnings or errors. This often happens when the database scripts delete an object before creating it. When the scripts are run for the first time, there are no objects to delete which results in error messages. These errors and warnings be ignored.
If you would like to verify that the scripts worked, you can run the following commands and see if you got the same results. (Replace DB_NAME with the name of your database.)
Connect as oe8/oe8@DB_NAME in SQL*Plus execute the following statement:
There should be 319 rows.
Connect as hl/hl@DB_NAME in SQL*Plus execute the following statement:
There should be 3 rows.
This step will create the virtual directories and servlet mappings for the HTTP listener, which are used by the demos.
Get the file frmjdapi.jar from C:\Oracle\Middleware\as_1\jlib. Unpack it and create a new folder util in oracle\forms\jdapi. In the util folder copy the contents of the directory demos\metadatabrowser\classes\oracle\forms\jdapi\util\. Pack the jar file again and copy it to C:\Oracle\Middleware\user_projects\domains\ClassicDomain\servers\WLS_FORMS\stage\formsapp\11.1.1\formsapp\formsweb.war\WEB-INF\lib
Using a text editor, open the following file:
C:\Oracle\Middleware\user_projects\domains\ClassicDomain\servers\WLS_FORMS\stage\formsapp\11.1.1\formsapp\formsweb.war\WEB-INF\weblogic.xml
Add the following line within the <weblogic-web-app> tags
<virtual-directory-mapping> |
For version 11.1.1.2, only add the following two lines in the file C:\Oracle\Middleware\asinst_1\config\OHS\ohs1\moduleconf\forms.conf:
AliasMatch ^/forms/demos/(..*) "C:\Oracle\Middleware\as_1\forms\demos/$1"
WLExcludePathOrMimeType /forms/demos/
Using a text editor, open the following file:
C:\Oracle\Middleware\user_projects\domains\ClassicDomain\servers\WLS_FORMS\stage\formsapp\11.1.1\formsapp\formsweb.war\WEB-INF\web.xml
Find where this text is located:
<servlet>
<servlet-name>lservlet</servlet-name>
<servlet-class>oracle.forms.servlet.ListenerServlet</servlet-class>
</servlet>
and put the following text after it:
<!-- Forms JDAPI Metadata Browser Servlet -->
<servlet>
<servlet-name>FormsBrowser</servlet-name>
<servlet-class>oracle.forms.jdapi.util.FormsBrowser</servlet-class>
</servlet>
You should end up with the following:
<servlet>
<servlet-name>lservlet</servlet-name>
<servlet-class>oracle.forms.servlet.ListenerServlet</servlet-class>
</servlet>
<!-- Forms JDAPI Metadata Browser Servlet -->
<servlet>
<servlet-name>FormsBrowser</servlet-name>
<servlet-class>oracle.forms.jdapi.util.FormsBrowser</servlet-class>
</servlet>
In the same file, now find the following text:
<servlet-mapping>
<servlet-name>lservlet</servlet-name>
<url-pattern>/lservlet*</url-pattern>
</servlet-mapping>
and put the following text after it:
<servlet-mapping>
<servlet-name>FormsBrowser</servlet-name>
<url-pattern>/FormsBrowser*</url-pattern>
</servlet-mapping>
You should end up with the following:
<servlet-mapping>
<servlet-name>lservlet</servlet-name>
<url-pattern>/lservlet*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>FormsBrowser</servlet-name>
<url-pattern>/FormsBrowser*</url-pattern>
</servlet-mapping>
Start the WLS_FORMS server. If you're not sure how to do that, refer to Appendix 1 for instructions. If the WLS_FORMS server was already running when you made these changes then you need to restart it first.
Once the WLS_FORMS server is running (or re-started), enter the following URL, replacing <host> and <port> with the correct values:
http://<host>:<port>/forms/demos/images/tick.gif
For 11gR2, use
http://<host>:<httpserverport>/forms/demos/images/tick.gif
You should see this image:
Using a text editor, open both of the following files:
%ORACLE_HOME%\forms\demos\install\formswebDemos.cfg
C:\Oracle\Middleware\user_projects\domains\ClassicDomain\servers\WLS_FORMS\stage\formsapp\11.1.1\formsapp\config\formsweb.cfgFor 11.1.1.2, the file is C:\Oracle\Middleware\user_projects\domains\ClassicDomain\config\fmwconfig\servers\WLS_FORMS\applications\formsapp_11.1.1\config\formsweb.cfg
Copy-and-paste the entire contents of formswebDemos.cfg to the end of formsweb.cfg. That is, you are essentially appending formswebDemos.cfg to formsweb.cfg.
Some of the parameters from the previous step need to be modified for your environment. Do a global search-and-replace for the following in C:\Oracle\Middleware\user_projects\domains\ClassicDomain\servers\WLS_FORMS\stage\formsapp\11.1.1\formsapp\config\formsweb.cfg:
What to search for... | What to replace it with... |
---|---|
%ORACLE_HOME% | The same value that you are using for %ORACLE_HOME% in this document, as detailed in the Conventions section. |
%DB_NAME% | The connect string for the database where you installed the demo components in step 2 Install the demo data. |
%JSPELL_HOST% | OPTIONAL. The machine hosting the JSpell server. This is only needed if you intend to run the JSpell demo, which requires extra configuration because it uses third party software. Refer to the JSpell Demo Doc for more information. |
There are several occurrences of %ORACLE_HOME% and %DB_NAME% so be sure you replaced them all.
Copy the following file to C:\Oracle\Middleware\user_projects\domains\ClassicDomain\servers\WLS_FORMS\stage\formsapp\11.1.1\formsapp\config:
%STAGE_HOME%\install\formsdemo.env
Using a text editor, open the Forms demo environment file:
C:\Oracle\Middleware\user_projects\domains\ClassicDomain\servers\WLS_FORMS\stage\formsapp\11.1.1\formsapp\config\formsdemo.env
Do a global search-and-replace for the following:
What to search for... | What to replace it with... |
---|---|
%ORACLE_HOME% | The same value that you are using for %ORACLE_HOME% in this document, as detailed in the Conventions section. |
There are many instances of %ORACLE_HOME% so be sure that you replaced them all.
Windows restricts the length of environment variables, so the maximum length of the FORMS_PATH environment variable is 512 characters. If your %ORACLE_HOME% was already long, then this could make your FORMS_PATH too long. In that case, make your FORMS_PATH as long as possible, but less than 512 characters, and put the rest of the environment variable in the ORACLE_PATH environment variable.
Note: If the summit application is installed in the environment where the demos are installed, the following must be done: in the forms/java/summit/web directory, create a directory called images and copy the graph images there (they can be found in \demos\bigraph\src\) In the same forms/java/summit/web directory, create a directory called calendar_icons and copy the calendar images. And lastly, unpack the icons.jar file and copy all the images in forms/java/summit/web
Make sure WLS_FORMS is running and enter the following URL, replacing <host> and <port> with the correct values:
http://<host>:<port>/forms/demos/demos.html
For the 11.1.1.2 version, make sure the HTTP server is started and enter the following URL, replacing <host> and <port> with the correct values:
http://<host>:<httpserverport>/forms/demos/demos.html
Alternatively, you can double-click the following file to launch the demos:
%ORACLE_HOME%\forms\demos\launchdemos.html
Note: even though the compiled code is available in the demos, it is recommended that the code is recompiled in the environment where the demos are deployed.
From the Windows Start Menu, choose Programs -> Oracle Classic Instance - xxx-> Forms Services -> Start Weblogic Server - WLS_FORMS, where xxx is the name of your Oracle Home when you installed FMw 11g.