The jsp:plugin
action enables you to invoke an applet on a client browser.
This action generates HTML text containing the appropriate client-browser dependent constructs (OBJECT
or EMBED
) that result in the download of the Java plugin and subsequent execution of an applet or bean.
This element is replaced by either an <object>
or <embed>
tag, as appropriate for the requesting user agent, and emitted into the output stream of the response.
The following example invokes MyPlugin.class on the client:
<jsp:plugin type=applet code="MyPlugin.class" codebase="/html" > <jsp:params> <jsp:param name="myplugin" value="Greetings"/> </jsp:params> <jsp:fallback> <p> unable to load Plugin </p> </jsp:fallback> </jsp:plugin>
The syntax for jsp:plugin is shown below:
<jsp:plugin
type="bean|applet"
code="objectCode"
codebase="objectCodebase"
{ align="alignment" }
{ archive="archiveList" }
{ height="height" }
{ hspace="hspace" }
{ jreversion="jreversion" }
{ name="componentName" }
{ vspace="vspace" }
{ width="width" }
{ nspluginurl="url" }
{ iepluginurl="url" } >
{ <jsp:params>
{ <jsp:param name=" paramName"
value="paramValuee" /> }+
</jsp:params> }
{ <jsp:fallback> arbitrary_text </jsp:fallback> }
</jsp:plugin>
Identifies the type of the component as either a bean or applet.
Specifies either the name of the class file that contains the applet or the path to the class.
Specifies the base path used to resolve any relative paths specified by the archive
attribute. If you omit this attribute, the default value is the base path of the JSP page.
For more information, see the HTML 4.0 specification at the following URL:
http://www.w3.org/TR/REC-html40/
Specifies the position of a bean or applet. The following values for align
determine the object's position with respect to surrounding text:
bottom
: The bottom of the object is vertically aligned with the current baseline. This is the default value.
middle
: The center of the object is vertically aligned with the current baseline.
top
: The top of the object is vertically aligned with the top of the current text line.
left
and right
: The image floats to the current left or right margin.
For more information, see the HTML 4.0 specification at the following URL:
http://www.w3.org/TR/REC-html40/
Specifies a space-separated list of URIs for archives containing resources for the object. Preloading archives will generally result in reduced load times for objects. Archives specified as relative URIs are interpreted relative to the codebase
attribute.
For more information, see the HTML 4.0 specification at the following URL:
http://www.w3.org/TR/REC-html40/
Overrides the default bean or applet height to use the specified value. You can specify a values as:
For more information, see the HTML 4.0 specification at the following URL:
http://www.w3.org/TR/REC-html40/
Specifies the amount of white space to be inserted to the left and right of a bean or applet. You can specify a values as:
For more information, see the HTML 4.0 specification at the following URL:
http://www.w3.org/TR/REC-html40/
Identifies the specification version number of the JRE that the component requires in order to operate; the default is: "1.1".
Specifies a name for the applet, making it possible to reference the applet from JavaScript or for another applet on the same page.
Specifies the amount of white space to be inserted above and below a bean or applet. You can specify a values as:
For more information, see the HTML 4.0 specification at the following URL:
http://www.w3.org/TR/REC-html40/
Specifies descriptive information about the applet.
For more information, see the HTML 4.0 specification at the following URL:
http://www.w3.org/TR/REC-html40/
Override the default object width of a bean or applet to use the specified value. You can specify a values as:
See the HTML 4.0 specification for more information.
Specifies the URL where JRE plugin can be downloaded for Netscape Navigator. The default is implementation defined.
Specifies the URL where JRE plugin can be downloaded for Internet Explorer. The default is implementation defined.
Specifies parameters to the Applet or JavaBeans component. For more information, see jsp:param.
Specifies the content displayed by the client browser if the plugin cannot be started. If the plugin can start but the Applet or JavaBeans component cannot be found or started, a plugin-specific message sent to the user.