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 ="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>
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 ="Jreversionnumber|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.