JSP: plugin action enables you to insert the object or EMBED element of a specific browser to specify the plug-in required for the browser to run a Java applet.
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>
Attribute details:
Attribute usage
Type = "bean | applet"
Type of the object to be executed by the plug-in. You must specify one in bean or applet because there is no default value for this attribute.
Class = "classfilename"
Name of the Java class file to be executed by the plug-in. The name must contain the extension. The file must be in the directory specified by the "codebase" attribute.
Codebase = "classfiledirectoryname"
Contains the directory of the Java class that the plug-in runs or points to the path of this directory. The path of the JSP file by default.
Name = "InstanceName"
The name of the bean or applet instance. This makes communication between beans or applets called by the same JSP file possible.
Archive = "urltoarchive ,..."
List of path names separated by commas. Is the path name of the archive file pre-loaded by the class loader under the directory specified by codebase. Generally, these archive files are securely loaded through the network, which can significantly improve the performance of the applet.
Comments and character reference habits
You can use some specific elements to insert comments and some characters that are usually used as special symbols. The following is a summary: syntax Purpose
<% -- Comment -- %> A comment in JSP format. Will be ignored by the JSP-to-scriptlet compiler. Any embedded JSP scripting elements, ctictives, or actins will be ignored. Example:
<% @ Page Language = "Java" %>
<HTML>
<Head> <title> A comment test </title>
<Body>
<H2> A test of comments </H2>
<% -- This part of comments will not be viewedSource code-- %>
</Body>
</Html>
<! -- Annotation --> HTML annotation. Directly to the final HTML. Any embedded JSP scripting elements, directives, or actins will be executed normally. Example:
<! -- This page was loaded on
<% = (New java. util. Date (). tolocalestring () %> -->
View SourceCodeYou will see:
<! -- This page was loaded on January 1, 2000 -->
<\ % In template text (static html), please write this special symbol (<%) on the page.
% \> Used in scripting elements, which is similar to the preceding "</%.
\ 'Indicates the character "'" In the attribute where "'" is used. Of course, you can also use "" to differentiate. Example: 'pig "fhjgj" ', or, 'pig \ 'fhjgj \''
\ "Indicates the character" "in the" "attribute used. Of course, you can also use "'" to differentiate. Example: "pig 'fhjgj'", or, "pig \" fhjgj \""
% \> "%>" In the property ".
<\ % "In the attribute ".