Sun Java Solaris Communities My SDN Account Join SDN
 
Java Plug-in 1.2.2 Documentation

Guide to Using Java Plug-in 1.2.2 in Intranet Environments

 
PLUG-IN IN INTRANET ENVIRONMENTS
Java Plug-in HTML Specification | Java Plug-in Scripting | Java Plug-in Home Page

- Introduction
- How Java Plug-in Works
- Deploying Java Plug-in with Internet Explorer
- Deploying Java Plug-in with Navigator
- Modifying HTML Files to Run in Any Browser
- Conclusion

Introduction

Java Plug-in is a software product from Sun Microsystems, Inc. that allows web page authors to direct Java applets or JavaBeans on their intranet web pages to run using Sun's Java 2 Runtime Environment, Standard Edition (JRE). 

Java Plug-in is for enterprise customers who wish to deploy JDK 1.1 and Java 2 SDK, Standard Edition v 1.2.2-based applets on their intranet web pages, and who also support both Windows-based and Solaris-based browsers in their enterprise. This will allow developers to develop and deploy applets with full support for all of the features and capabilities of JDK 1.1 (such as JavaBeans, RMI) and Java 2 SDK, Standard Edition v 1.2.2 (such as JFC, Java2D) and have confidence that they will run as expected in IE and Navigator. This document specifies the steps that are necessary for deploying Java Plug-in in intranet environments.

How Java Plug-in Works

Java Plug-in does not replace the underlying virtual machine. Rather, it enables web page authors to use Sun's JRE instead of the default VM. This ensures enterprise developers that JDK 1.1 and Java 2 SDK, Standard Edition v 1.2.2-based applets are executed with full support for all of the features and capabilities of JDK 1.1 (such as JavaBeans, RMI) and Java 2 SDK, Standard Edition v 1.2.2 (such as JFC, Java2D) in Microsoft's IE 3.02 or later, and Netscape's Navigator 3.0 or later on various Win32 platforms and Solaris platforms.

Internet Explorer: Java Plug-in uses Internet Explorer's extension mechanisms to allow Sun's JRE to run inside Internet Explorer. The technology used to achieve this is Microsoft's COM/ActiveX. Using the HTML <OBJECT> tag, web page authors can run ActiveX controls or COM components as part of a web page. IE provides elaborate mechanisms for downloading and caching ActiveX controls that make it possible for the web browser to use Sun's JRE with minimal user intervention.

Netscape Navigator: Java Plug-in uses Navigator's plug-in architecture to allow Sun's JRE to run inside Navigator, much like running QuickTime movies or Shockwave animations with plug-ins. Using the HTML <EMBED> tag, web page authors can run plug-ins as part of a web page. This makes it possible for the web browser to use Sun's JRE in Navigator.

To utilize all of the features and capabilities of JDK 1.1 and Java 2 SDK, Standard Edition v 1.2.2 in IE or Navigator, web page authors must specify the use of Sun's JRE via Java Plug-in. Authors must modify their web pages to invoke Sun's JRE. Sun provides a written specification to guide web page authors on how to make these changes. In addition, Sun provides the Java Plug-in HTML Converter free of charge. This converter will automatically make the necessary changes to a selected set of HTML pages.

Deploying Java Plug-in with Internet Explorer (IE)

To deploy the Java Plug-in in intranet environments with IE, web page authors must convert the <APPLET> tags in the HTML file to <OBJECT> tags. The actual mapping between the <APPLET> tag and the <OBJECT> tag is specified in the Java Plug-in HTML Specification from Sun Microsystems. Here is an example:

Original APPLET tag:

	
	   <APPLET code="XYZApp.class" codebase="html/" align="baseline"
           width="200" height="200">
       <PARAM NAME="model" VALUE="models/HyaluronicAcid.xyz">
            No JDK 1.2 support for APPLET!!
       </APPLET>
	

New OBJECT tag:

	
	   <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
           width="200" height="200" align="baseline"
            codebase="http://javaweb.eng/plugin/jre-1_2_2-win.exe#Version=1,2,0,0">

       <PARAM NAME="code" VALUE="XYZApp.class">
       <PARAM NAME="codebase" VALUE="html/">
       <PARAM NAME="type" VALUE="application/x-java-applet;version=1.2">
       <PARAM NAME="model" VALUE="models/HyaluronicAcid.xyz">
            No JDK 1.2 support for APPLET!!
       </OBJECT>
	

To deploy Java Plug-in in intranet environments with IE, you need to download and store the Java Plug-in binary file on one of your web servers. Then you need to modify the codebase attribute inside the <OBJECT> tag in the HTML file. For example, if you want to use the Java Plug-in binary file in "http://javaweb.eng/plugin/", then you can specify the codebase attribute as "http://javaweb.eng/plugin/jre-1_2_2-win.exe#Version=1,2,0,0". Please note the version number in the URL. For Java Plug-in 1.2 (shown in the example), the version number is 1,2,0,0. This version number will change for each release. You are required to change the version number inside the <OBJECT> tag in the HTML file if you want to specify the newest release of Java Plug-in. The file jre-1_2_2-win.exe is the same binary file that you can download directly from the Java Software web site, and it is digitally signed with a VeriSign digital signature signed by "Sun Microsystems, Inc.". If you are using the Java Plug-in HTML Converter, you can simply change the conversion template file to specify the latest Plug-in version (the CabFileLocation variable) before the conversion. Please consult the README file in the Java Plug-in HTML Converter for information about modifying the conversion template.

Once you implement these changes, when a machine that does not have Java Plug-in installed browses an HTML page with IE, IE will look into your predefined location (http://javaweb.eng/plugin in this case) and download Java Plug-in. Notice that there is no need to download Java Plug-in over the firewall if the web server is inside the intranet, or if your machine is not isolated inside the firewall.

Deploying Java Plug-in with Navigator

To deploy Java Plug-in in intranet environments with Navigator, web page authors must convert the <APPLET> tags in the HTML file to <EMBED> tags. The actual mapping between the <APPLET> tag and the <EMBED> tag is specified in the Java Plug-in HTML Specification from Sun Microsystems. Here is an example:

Original APPLET tag: 

<APPLET code="XYZApp.class" codebase="html/" align="baseline"
    width="200" height="200">
<PARAM NAME="model" VALUE="models/HyaluronicAcid.xyz">
    No JDK 1.2 support for APPLET!!
</APPLET>

New EMBED tag:

<EMBED type="application/x-java-applet;version=1.2" width="200" height="200"
    align="baseline" code="XYZApp.class" codebase="html/"
    model="models/HyaluronicAcid.xyz"
    pluginspage="http://javaweb.eng/plugin/plugin-install.html">
<NOEMBED>
    No JDK 1.2 support for APPLET!!
</NOEMBED>
</EMBED>

To deploy Java Plug-in in intranet environments with Navigator, you need to download and store the Java Plug-in binary file on one of your web servers. Then you need to set up a Java Plug-in Download page and modify the pluginspage attribute in the EMBED tag to refer to this page. The Download page should have options to download different versions of Java Plug-in, such as for Windows and Solaris. For example, if you have set up the Java Plug-in Download page at "http://javaweb.eng/plugin/" and the page is called plugin-install.html, you can specify the pluginspage as "http://javaweb.eng/plugin/plugin-install.html". If you are using the Java Plug-in HTML Converter, you can simply change the conversion template file to specify your download page (the NSFileLocation variable) before the conversion. Please consult the README file in the Java Plug-in HTML Converter for information about modifying the conversion template. There is a working example of the plugin installation page at http://java.sun.com/products/ plugin/1.2/plugin-install.html.

Once you implement these changes, when a machine that does not have Java Plug-in installed browses an HTML page with Navigator, users will see a plugin-missing picture on the HTML page. When the user clicks on this picture, Navigator directs the user to your predefined Java Plug-in Download Page (http://javaweb.eng/plugin/plugin-install.html in this example). Notice that there is no need to download Java Plug-in over the firewall if the web server is inside the intranet, or if your machine is not isolated inside the firewall.

Modifying HTML Files to Run in Any Browser

To maximize the chance that your HTML pages display applets properly in any browser, you can combine OBJECT and EMBED tags in a single file. Because Internet Explorer ignores anything between COMMENT tags and Navigator doesn't recognize the OBJECT tag, the following is an example of converting an applet to run in any browser:

Original APPLET tag:

<APPLET code="XYZApp.class" codebase="html/" align="baseline"
    width="200" height="200">
<PARAM NAME="model" VALUE="models/HyaluronicAcid.xyz">
    No JDK 1.2 support for APPLET!!
</APPLET>
    

Combined OBJECT and EMBED tags:

<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    width="200" height="200" align="baseline"
    codebase="http://javaweb.eng/plugin/jre-1_2_2-win.exe#Version=1,2,0,0">
<PARAM NAME="code" VALUE="XYZApp.class">
<PARAM NAME="codebase" VALUE="html/">
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.2">
<PARAM NAME="model" VALUE="models/HyaluronicAcid.xyz">
<COMMENT>
    <EMBED type="application/x-java-applet;version=1.2" width="200" height="200"
        align="baseline" code="XYZApp.class" codebase="html/"
        model="models/HyaluronicAcid.xyz"
        pluginspage="http://javaweb.eng/plugin/plugin-install.html">
    <NOEMBED></COMMENT>
        No JDK 1.2 support for APPLET!!
    </NOEMBED>
    </EMBED>
</OBJECT>

Conclusion

Java Plug-in can be deployed in an intranet environment. Once it is set up correctly, Java Plug-in can be downloaded and installed in the intranet without leaving the firewall.