Creating a Jar File for Images Using Files Within the Jar File

4-38 Forms Services Deployment Guide

4.7.4 Splash screen and Background Images

When you deploy your applications, you have the ability to specify a splash screen image displayed during the connection and a background image file. Those images are defined in the HTML file or you can use the Web Configuration page in Enterprise Manager: PARAM NAME=splashScreen VALUE=splash.gif PARAM NAME=background VALUE=back.gif The default location for the splash screen and background image files is in the DocumentBase directory containing the baseHTML file.

4.7.5 Custom Jar Files Containing Icons and Images

Each time you use an icon or an image for a splash screen or background, an HTTP request is sent to the Web server. To reduce the HTTP round-trips between the client and the server, you have the ability to store your icons and images in a Java archive Jar file. Using this technique, only one HTTP round-trip is necessary to download the Jar file.

4.7.5.1 Creating a Jar File for Images

The Java SDK comes with an executable called jar. This utility enables you to store files inside a Java archive. For more information, see http:java.sun.com . For example: jar -cvf myico.jar Splash.gif Back.gif icon1.gif This command stores three files Splash.gif, Back.gif, icon1.gif in a single Jar file called myico.jar. Registry.dat Applications with custom icons that are stored in a different location as the Oracle Forms install can be another server. Useful to make other changes to the Registry.dat file such as font mapping. Copy Registry.dat and change ServerApp parameter in formsweb.cfg. Note: Image formats for splash screens and icons are the standard formats that are supported by java.awt.Image. For more information on java.awt.Image, refer to the Java Advanced Imaging JAI API at http:java.sun.com . Table 4–20 Cont. Icon Location Guide Icon Location When How Configuring and Managing Forms Services 4-39

4.7.5.2 Using Files Within the Jar File

The default search path for the icons and images is relative to the documentBase. However, when you want to use a Jar file to store those files, the search path must be relative to the codebase directory, the directory which contains the Java applet. To use a Jar file to store icons and images, you must specify that the search path is relative to codebase using the imageBase parameter in the formsweb.cfg file or HTML file. This parameter accepts two different values: ■ documentBase The search path is relative to the documentBase directory. If no value is specified for imageBase, then the value of documentBase is used. ■ codeBase The search path is relative to the codeBase directory, which gives the ability to use Jar files. In this example, we use a JAR file containing the icons and we specify that the search should be relative to codeBase. If the parameter imageBase is not set, the search is relative to documentBase and the icons are not retrieved from the Jar file. For example formsweb.cfg: archive=frmall.jar, icons.jar imageBase=codeBase

4.7.6 Search Path for Icons and Images