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.
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 OC4J configuration
3a Modify orion-web.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
6 Install the Demo Web Service
6a Make sure OC4J is started
6b Install the Web Service
6c Verify the Web Service Installation
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:
These demos are intended to be installed on Windows NT, 2000, or XP only.
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 Developer Suite is installed (or Oracle Application Server if you are installing into that). Wherever you see %ORACLE_HOME% in this guide, you should replace it with your Oracle Home. e.g. C:\Oracle\ids10112.
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.
Using a text editor, open the following file:
%ORACLE_HOME%\j2ee\DevSuite\application-deployments\forms\formsweb\orion-web.xml
Add the following lines within the <orion-web-app> tags, making sure to replace %ORACLE_HOME% with the correct value:
<classpath path="%ORACLE_HOME%/forms/java/frmjdapi.jar" /> |
To be sure you have the placement correct, your file should look something like the following:
<?xml version="1.0"?> |
Using a text editor, open the following file:
%ORACLE_HOME%\forms\j2ee\formsapp\formsweb\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 OC4J. If you're not sure how to do that, refer to Appendix 1 for instructions. If OC4J was already running when you made these changes then you need to restart it first.
Once OC4J is running (or re-started), enter the following URL, replacing <host> and <port> with the correct values:
http://<host>:<port>/forms/formsdemo/images/tick.gif
If you are using Oracle Developer Suite, the URL might look like this:
http://127.0.0.1:8889/forms/formsdemo/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
%ORACLE_HOME%\forms\server\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 %ORACLE_HOME%\forms\server\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 files to %ORACLE_HOME%\forms\server:
%STAGE_HOME%\install\formsdemo.env
%STAGE_HOME%\install\demobase.html
%STAGE_HOME%\install\demobaseie.html
%STAGE_HOME%\install\demobasejini.html
%STAGE_HOME%\install\demobasejpi.htm
Using a text editor, open the Forms demo environment file:
%ORACLE_HOME%\forms\server\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.
Start OC4J. If you're not sure how to do this, refer to the instructions in Appendix 1.
From a DOS window, run the following command.
%ORACLE_HOME%\forms\demos\install\installwebservice.bat %ORACLE_HOME%
Make sure you replace both instances of %ORACLE_HOME% in the above statement with the correct value (see the Conventions section).
Note: If your %ORACLE_HOME% has spaces then you will need to edit installwebservice.bat in a text editor before running it. Modify the set and if lines to something like the following:
set OHOME="c:\My Programs\oracle\ids10g"
REM if "%OHOME%"=="" goto ERROR
Note: The installwebservice.bat assumes that you used the default port and administrator username and password for O4CJ. If you have changed any of those then you will need to modify the batch script accordingly. For the RMI port, look in
%ORACLE_HOME%\j2ee\DevSuite\config\rmi.xml
Then you can modify installwebservice.bat with the correct RMI port number.
To verify that the intallation of the Web Service worked, enter the following URL, replacing <host> and <port> with the correct values:
http://<host>:<port>/demowebservice/Forms90CurrencyConverter
If you are using Oracle Developer Suite, the URL might look like this:
http://127.0.0.1:8889/demowebservice/Forms90CurrencyConverter
Note: this URL is case sensitive
You should see a web page with some information about the Currency Converter Web Service:
Make sure OC4J is running and enter the following URL, replacing <host> and <port> with the correct values:
http://<host>:<port>/forms/formsdemo/demos.html
If you are using Oracle Developer Suite, the URL might look like this:
http://127.0.0.1:8889/forms/formsdemo/demos.html
Alternatively, you can double-click the following file to launch the demos:
%ORACLE_HOME%\forms\demos\launchdemos.html
From the Windows Start Menu, choose Programs -> Oracle Developer Suite - xxx -> Forms Developer -> Start OC4J Instance, where xxx is the name of your Oracle Home when you installed iDS.
(This menu icon is just a shortcut which runs %ORACLE_HOME%\j2ee\DevSuite\startinst.bat. You can run this manually in a DOS window if you like.)
You know it has successfully started when it says Oracle Application Server Containers for J2EE 10g (10.1.2.0.2) initialized. When you initially run OC4J there may be a delay for a few moments as everything unpacks and initializes.