jsp:plugin

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>
type

Identifies the type of the component as either a bean or applet.

code

Specifies either the name of the class file that contains the applet or the path to the class.

codebase

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/

align

Specifies the position of a bean or applet. The following values for align determine the object's position with respect to surrounding text:

For more information, see the HTML 4.0 specification at the following URL:

http://www.w3.org/TR/REC-html40/

archive

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/

height

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/

hspace

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/

jreversion

Identifies the specification version number of the JRE that the component requires in order to operate; the default is: "1.1".

name

Specifies a name for the applet, making it possible to reference the applet from JavaScript or for another applet on the same page.

vspace

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/

title

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/

width

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.

nspluginurl

Specifies the URL where JRE plugin can be downloaded for Netscape Navigator. The default is implementation defined.

iepluginurl

Specifies the URL where JRE plugin can be downloaded for Internet Explorer. The default is implementation defined.

jsp:param

Specifies parameters to the Applet or JavaBeans component. For more information, see jsp:param.

jsp:fallback

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.