[Top] [Prev] [Next] [Bottom]

<jsp:plugin>

Executes an applet or Bean and, if necessary, downloads a Java plug-in to execute it.

JSP Syntax

<jsp:plugin
          type="bean | applet"
          code="classFileName"
          codebase="classFileDirectoryName"
          [ name="instanceName" ]
          [ archive="URIToArchive, ..." ]
          [ align="bottom | top | middle | left | right" ]
          [ height="displayPixels" ]
          [ width="displayPixels" ]
          [ hspace="leftRightPixels" ]
          [ vspace="topBottomPixels" ]
          [ jreversion="JREVersionNumber | 1.1" ]
          [ nspluginurl="URLToPlugin" ]
          [ iepluginurl="URLToPlugin" ] >

          [ <jsp:params>
          [ <jsp:param name="parameterName" value="{parameterValue | <%= expression %>}" /> ]+
          </jsp:params> ]
 
          [ <jsp:fallback> text message for user </jsp:fallback> ]
 
</jsp:plugin>

Examples

<jsp:plugin type=applet code="Molecule.class" codebase="/html">
    <jsp:params>
          <jsp:param name="molecule" value="molecules/benzene.mol" />
    </jsp:params>
    <jsp:fallback>
          <p>Unable to load applet</p>
    </jsp:fallback>
</jsp:plugin>

Description

The <jsp:plugin> element plays or dispays an object (typically an applet or Bean) in the client Web browser, using a Java plug-in that is built in to the browser or downloaded from a specified URL.

When the JSP file is translated and compiled and Java and sends back an HTML response to the client, the <jsp:plugin> element is replaced by either an <object> or <embed> element, according to the browser version. The <object> element is defined in HTML 4.0 and <embed> in HTML 3.2.

In general, the attributes to the <jsp:plugin> element specify whether the object is a Bean or an applet, locate the code that will be run, position the object in the browser window, specify an URL from which to download the plug-in software, and pass parameter names and values to the object. The attributes are described in detail in the next section.

Attributes

See Also



[Top] [Prev] [Next] [Bottom]

Copyright © 1999, Sun Microsystems, Inc. All rights reserved.