Contents | Prev | Next


<jsp:plugin>

Causes the execution of an applet or bean. The applet or bean executes in the specified plugin. If the plugin is not available, displays a dialog to initiate the download of the plugin software.

JSP Syntax

<jsp:plugin	
   type="bean|applet"	
   code="classFileName"	
   codebase="classFileDirectoryName"	
   [ name="instanceName" ]	
   [ archive="URIToArchive, ..." ]	
   [ align="bottom|top|middle|left|right" ]	
   [ height="{displayPixels |  <%= expression %>}"]	
   [ width="{displayPixels |  <%= expression %>}"]	
   [ hspace="leftRightPixels" ]	
   [ vspace="topBottomPixels" ]	
   [ jreversion="JREVersionNumber | 1.2" ]	
   [ nspluginurl="URLToPlugin" ]	
   [ iepluginurl="URLToPlugin" ] >	
	
   [ <jsp:params>	
      [ <jsp:param name="parameterName"	
         value="{parameterValue | '${' Expression '}' | 	
         <%= expression %>}" /> ]+	
   </jsp:params> ]	
	
   [ <jsp:fallback> text message if plugin download fails 	
      </jsp:fallback> ]	
	
</jsp:plugin>

XML Syntax

<jsp:plugin	
   type="bean|applet"  code="classFileName"	
   codebase="classFileDirectoryName"	
   [ name="instanceName" ]  [ archive="URIToArchive, ..." ]	
   [ align="bottom|top|middle|left|right" ]	
   [ height="{displayPixels | '${' Expression '}' | %= expression %}" ]	
   [ width="{displayPixels | '${' Expression '}' | %= expression %}"]	
   [ hspace="leftRightPixels" ]  [ vspace="topBottomPixels" ]	
   [ jreversion="JREVersionNumber | 1.2" ]	
   [ nspluginurl="URLToPlugin" ]	
   [ iepluginurl="URLToPlugin" ]  >	
   [ <jsp:params>	
      [ <jsp:param name="parameterName"	
         value="{parameterValue | '${' Expression '}' | 	
         %= expression %}" /> ]+	
   </jsp:params> ]	
   [ <jsp:fallback>  text message if plugin download fails	
   </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 displays 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 page 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



Contents | Prev | Next

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