<Jsp: plugin> execute an applet or Bean. If possible, download 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 = "Maid number | 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>
Example
<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
<Jsp: plugin> elements are used to play or display an object (typically an applet and Bean) in a browser, and such display needs to be implemented in the browser's java Plug-in.
When the Jsp file is compiled and sent to the browser, the <jsp: plugin> element will be replaced with the <object> or <embed> element based on the browser version. Note: <object> is used for HTML 4.0 and <embed> for HTML 3.2.
In general, the <jsp: plugin> element specifies whether the object is an Applet or Bean, the class name, location, and where to download the Java Plug-in. The details are as follows:
Attribute
Type = "bean | applet"
. Type of the plug-in object to be executed. You must specify the Bean or applet, because this property has no default value.
Code = "classFileName"
The name of the Java Class to be executed by the Java Plug-in. It must end with. class. This file must exist in the directory specified by the codebase attribute.
Codebase = "classFileDirectoryName"
The directory (or path) of the Java Class file to be executed. If you do not provide this attribute, the Directory of the jsp file using <jsp: plugin> will be used.
Name = "instanceName"
The name of the Bean or applet instance, which will be called elsewhere in Jsp.
Archive = "URIToArchive ,..."
Some path names separated by commas (,) are used to pre-install the classes to be used, which improves the applet performance.
Align = "bottom | top | middle | left | right"
The position of the image, object, and Applet has the following values:
Bottom
Top
Middle
Left
Right
Height = "displayPixels" width = "displayPixels"
The length and width that the Applet or Bean will display. The value is a number in pixels.
Hspace = "leftRightPixels" vspace = "topBottomPixels"
When the Applet or Bean is displayed on the left and right of the screen, the space left up and down is measured in pixels.
Jreversion = "Maid number | 1.1"
The Java Runtime Environment (JRE) version required for running the Applet or Bean.
The default value is 1.1.
Nspluginurl = "URLToPlugin"
The JRE that Netscape Navigator users can use, which is a standard URL such as a http://www.aspcn.com/jsp
Iepluginurl = "URLToPlugin"
IE users can use JRE, this value is a standard URL, such as http://www.aspcn.com/jsp
<Jsp: params> [<jsp: param name = "parameterName"
Value = "{parameterValue | <% = expression % >}"/>] + </jsp: params>
The parameter or parameter value that you need to transmit to the applet or Bean.
<Jsp: fallback> text message for user </jsp: fallback>
A piece of text is used in Java
The plug-in cannot be displayed to the user when it is started. If the plug-in can be started but the applet or Bean cannot, an error message will pop up in the browser.