FAQ: How does an ArcIMS Java Viewer load and reference the ArcIMS Viewer plug-in?
How does an ArcIMS Java Viewer load and reference the ArcIMS Viewer plug-in?
To view ArcIMS Java Viewer based Web sites, the ArcIMS Java custom and standard viewers use the browser's Java plug-in to load the ArcIMS Viewer plug-in.
The following describes the files accessed when an ArcIMS Java Viewer based Web site is loaded into a browser. They are separated in the ArcIMS Java standard and custom viewers. A detailed description of the HTML code that installs and references the Java plug-in and ArcIMS Viewer plug-in is provided.
ArcIMS Java Standard:
1. The default.htm file checks for the Java plug-in. If it is not located, default.htm prompts the client to download and install a JRE.
2. The viewer.htm or viewerNS47.htm file checks for the ArcIMS Viewer plug-in. If it is not located, either file prompts the client to download the ArcIMS Viewer plug-in.
ArcIMS Java Custom:
1. The ie.htm file checks for the Java plug-in. If it is not located, default.htm prompts the client to download and install a JRE.
2. The map.htm file checks for the ArcIMS Viewer plug-in. If it is not located, the code in the map.htm file prompts the client to download the ArcIMS Viewer plug-in.
The following files contain references to Java applets that prompt the client to install the ArcIMS Viewer plug-in if it has not been installed. They contain code that interacts with the ArcIMS Java applets. By default, the map.htm file initially prompts the install.
Example From the map.htm file:
The explains sample lines of code pertaining to the Java and ArcIMS Viewer plug-in. Other files may have different values, but the idea is the same.
1. <OBJECT CLASSID="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH=100%
HEIGHT=100% CODEBASE="../install/install.htm" ID="IMSMap">
The OBJECT tag provides a generic way of including embedded objects into a Web page. Using OBJECT you can include various forms of media files (mpeg, mp3) as well as executable programs such as Java applets or ActiveX controls. The object referred to is the Java Plug-in for Windows. It is a JavaBean registered as an ActiveX control (beans.ocx), which allows Java applets to be run within a browser and it is installed with the Java Runtime Environment. The most recent browsers will support the OBJECT tag, however, for some older Netscape browsers, the EMBED tag must be used (see below).
The OBJECT attributes are as follows:
CLASSID is always the same number; it is the globally unique ActiveX id of the Java Plug-in.
HEIGHT and WIDTH are the size of the applet in the browser window and are required.
CODEBASE is required and references the location to be directed in case the object cannot be found.
ID merely provides the object with an identifier and is not required.
2. <PARAM NAME="code" VALUE="com/esri/aims/viewer/IMSMap">
3. <PARAM NAME="name" VALUE="IMSMap">
4. <PARAM NAME="SCRIPTABLE" VALUE="TRUE">
5. <PARAM NAME="type" VALUE="application/x-java-applet;version=1.2">
The ArcIMS Java applet requires parameters that can be passed to the applet using the tag.
The PARAM attributes are as follows:
NAME and VALUE contain parameter names and values to be passed to the object. In this case, CODE is the directory to the ArcIMS viewer (Java applet). NAME provides the object name.
TYPE specifies the type of application to be run, in this case, a Java applet.
7. <EMBED TYPE="application/x-java-applet;version=1.2" WIDTH="600"
HEIGHT="480" CODE="com/esri/ae/applet/IMSMap" NAME="IMSMap"
10. No JDK 1.2 support for APPLET!!
The EMBED tag is used for Netscape browsers to indicate whether an embedded object is one to be played or viewed by an available plug-in.
This is commented out using the COMMENT tag. In this case, the EMBED tag is not being used to load the Java plug-in and subsequently the ArcIMS Viewer. If the COMMENT tag is removed, the EMBED option will be available to the browser.
The EMBED tag is used by all ArcIMS supported Netscape browsers. The OBJECT tag may not be supported by older Netscape browsers, the EMBED tag will be needed. The NOEMBED tag provides content for browsers that don't understand object embedding.