Today we will disscuss on Displaying images in forms using oracle application server.
In application there are lots of images which is very hectic to manage,
For that we make an jar file an import it to oracle application server.
It works for me.. i hope it will work you too...
Display the Images in Forms using oracle Application server:
This document describes how to implement gif/jpg 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.
When running an Oracle Forms10g 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
file system 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.
Steps:
Below are the Steps for displaying the Images on Oracle Application server10g:
Step 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.
Step 2) Create the virtual directory in the forms.conf file that point to the location of
your Forms10g icons. This file is located in:
$ORACLE_HOME\forms\server\forms.conf
To define a virtual directory forms/icons, use the following syntax:
# Virtual path for ICONS (used to show icons in a form )
AliasMatch ^/forms/icons/(..*) "D:\Myfiles/icons/$1"
Below is an example of the forms.conf after it has been modified to include the
/forms/icons virtual directory.
# Virtual path mapping for Forms Java jar and class files (codebase)
AliasMatch ^/forms/java/(..*) "E:\APP/forms/java/$1"
# Virtual path for JInitiator downloadable executable and download page
AliasMatch ^/forms/jinitiator/(..*) "E:\APP/jinit/$1"
# Virtual path for runform.htm (used to run a form for testing purposes)
AliasMatch ^/forms/html/(..*) "E:\APP/tools/web/html/$1"
# Virtual path for ICONS (used to show icons in a form )
AliasMatch ^/forms/icons/(..*) "D:\Myfiles/icons/$1"
Step 3) Direct forms to use the /forms/icons
virtual directory when running on the web by
modifying the Registry.dat file in the
$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://
If the URL used to bring up forms on the web is:
http://hostname:7778/forms/frmservlet
Then the entry required for the Registry.dat will be:
default.icons.iconpath=http://hostname:7778/forms/icons
default.icons.iconextension=gif
Step 4) Now use EM Website to:
a) Restart the OC4J-BI-Forms Instance
b) Restart the BI-FORMS HTTP Server Instance.
Step 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://hostname:7778/forms/icons/exeqry.gif
Step 6) Check the form :
http://hostname:7778/forms/frmservlet?form=D:\Testcases\F10g\ICON_CHECK.fmx
After doing this still you are facing the problem in displaying the Images on Oracle Application Server ;
Do following testing and some solutions are provided below:
Solutions/Testing:
Testing and workarounds for the same..in case of any issues given below..
Icons do not appear in the browser using the URL:
- Verify that you are using the correct machine name and port for the OC4J_BI_Forms object.
- Check the virtual directory name to make sure that there are no typographica errors.
- Check for typographical errors in the forms.conf for the virtual directory.
- 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://hostname:7778/forms/
When icons do not appear on the form:
1) Test to see that the icon appears on your form by running the form. If the icon does not appear:
- Check the Registry.dat for typographical errors for the "default.icons" entries.
- Verify the name specified in the "Icon Filename" property of the form matches the case of the icon on the file system.
- If the property contains "EXEQRY", but the icon on the file system is named exeqry.gif, the icon will not appear when you run the form.
2) If icons are still not appearing on the form try these suggestions:
a) Close all of your existing, running forms and browser windows.
Delete all the old cached files from
For JInitiator 1.3.1.X:
Go to Control Panel->JInitiator 1.3.1.X->Cache Tab ->Click Clear Cache
Clear the browser cache:
------------------------
For IE : Tools menu->Internet Option->Delete all files
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.
b) Disable applet caching by setting or adding the jinit_appletcache="off"
in the HTML files:
$ORACLE_HOME/forms/server/base.htm
$ORACLE_HOME/forms/server/basejini.htm
$ORACLE_HOME/forms/server/basejpi.htm
$ORACLE_HOME/forms/server/baseie.htm
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.
All the best..
Regards,
Ajinkya Vichare
No comments:
Post a Comment