Display Iconic Images In Forms Using Oracle AS

Display Iconic Images In Forms Using Oracle AS

PURPOSE
=======

This document describes how to implement gif/jpeg icons on buttons for Forms using Oracle Application Server. This is done by defining a virtual directory containing the icons and directing the Forms Runtime to use that directory.

SCOPE & APPLICATION
====================
Audience: Forms Developer and Application Architects responsible for the deployment of forms applications over the web.This document ONLY describes the steps required for deploying icons in the Forms Services/ Runtime environment within Oracle 9iAS Rel 2. For information on deploying icons for Forms 9i/10g Builder / Runtime as part of 9i/10g Developers Suite, refer to:
Note 203846.1 How to Display Iconic Images Using Forms 9.0.x/ 10.x?
When running an Oracle Forms 9i/10g application the icon files used must be in a web enabled format such as JPG or GIF (GIF is the default format) (This is unlike older versions of forms running in client-server mode when the file format is .ico.)
Icon image files can either be retrieved by Forms as individual files on the filesystem or from a Java Archive (JAR file). If an application uses lots of icon images it is recommended that they are stored in a JAR file to reduce the number of HTTP round trips.
Reference:Note 232413.1 How to Deploy Iconic Images via a JAR File in Forms 9i/10g?
The example below details steps to configure iconic images as individual gif or jpeg files. It is a first approach recommended for initial testing and understanding.
Example:

========
This document has been written for use with both Windows and UNIX operating systems: Windows will use the "\" character to delimit directories and UNIX uses the "/" character. Any other differences are noted in the document.
1) Determine the physical location of the icons on your web server. For this example, assume that the icons are stored in D:\Myfiles\icons.
2) Create the virtual directory in the forms90.conf file that point to the location of your Forms 9i/10g icons. This file is located in:
$ORACLE_HOME\forms90\server\forms90.conf
To define a virtual directory forms90/icons, use the following syntax:
# Virtual path for ICONS (used to show icons in a form ) AliasMatch ^/forms90/icons/(..*) "D:\Myfiles/icons/$1"
Below is an example of the forms90.conf after it has been modified to include the /forms90/icons virtual directory.
# Virtual path mapping for Forms Java jar and class files (codebase) AliasMatch ^/forms90/java/(..*) "E:\IASR2\APP/forms90/java/$1" # Virtual path for JInitiator downloadable executable and download page AliasMatch ^/forms90/jinitiator/(..*) "E:\IASR2\APP/jinit/$1" # Virtual path for runform.htm (used to run a form for testing purposes) AliasMatch ^/forms90/html/(..*) "E:\IASR2\APP/tools/web90/html/$1"
# Virtual path for ICONS (used to show icons in a form ) AliasMatch ^/forms90/icons/(..*) "D:\Myfiles/icons/$1"
( For 10g use instead of "forms90" -> "forms")
3) Direct forms to use the /forms90/icons or /forms/icons virtual directory when running on the web by modifying the Registry.dat file in the $ORACLE_HOME\forms90\java\oracle\forms\registry or $ORACLE_HOME\forms\java\oracle\forms\registry
directory. Note that for UNIX, both the path name and file name are case sensitive. You must specify "Registry.dat". Modify the default.icons.iconpath entry as follows: default.icons.iconpath=http:///forms90/icons/ or default.icons.iconpath=http:///forms/icons/

If the URL used to bring up forms on the web is: http://abc.oracle.com:7778/forms90/f90servlet or http://abc.oracle.com:7778/forms/frmservlet

Then the entry required for the Registry.dat will be: default.icons.iconpath=http://abc.oracle.com:7778/forms90/icons or default.icons.iconpath=http://abc.oracle.com:7778/forms/icons default.icons.iconextension=gif
4) Now use EM Website to: a) Restart the OC4J-BI-Forms Instance b) Restart the BI-FORMS HTTP Server Instance.
5) Verify that the virtual directory has been defined properly and that the icons can be viewed in a browser. Assuming that exeqry.gif exists in the D:\Myfiles\icons directory, the following URL should show the icon:
http://abc.oracle.com:7778/forms90/icons/exeqry.gif or http://abc.oracle.com:7778/forms/icons/exeqry.gif

6) Check the form :
http://abc.oracle.com:7778/forms90/f90servlet?form=D:\Testcases\F90\ICON_CHECK_IASR2.fmx or http://abc.oracle.com:7778/forms/frmservlet?form=D:\Testcases\F10g\ICON_CHECK_IASR2.fmx

CHECKLISTS

=============
Icons do not appear in the browser using the URL: o Verify that you are using the correct machine name and port for the OC4J_BI_Forms object.o Check the virtual directory name to make sure that there are no typographical errors. o Check for typographical errors in the forms90.conf or forms.conf for the virtual directory. o Check the name of the icon on the file system. If the file is saved as Exeqry.gif, then it will not be found using the URL http://abc.oracle.com:7778/forms90/ Close all your browser sessions and open a new browser window. Execute the URL to bring up from the Form Builder runtime or from the browser.
( For 10G use "forms" instead of "forms90")
USEFUL REFERENCES:==================
[PDF] Oracle9iAS Forms Services Deployment Guide (P/N B10170-01)Configuring Oracle9iAS Forms Services -> Deploying Icons and Images Used by Oracle9iAS Forms Services
http://otn.oracle.com/products/forms/pdf/B10170_01.pdf
[PDF] Oracle9iForms Services - How to Deploy Iconshttp://otn.oracle.com/products/forms/pdf/webicons.pdf
Copyright © 2005, Oracle. All rights reserved.