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 -- %> |
JSP annotations. 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> |
<! -- Comment --> |
HTML annotations. 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), when you want to output this special symbol (<%) on the page, please write it like this. |
% \> |
Used in scripting elements, which is similar to the preceding "</%. |
\' |
The character "'" is used in the "'" attribute. Of course, you can also use "" to differentiate. Example: 'pig "fhjgj" ', or, 'pig \ 'fhjgj \'' |
\" |
The character "" is used in the "" attribute. Of course, you can also use "'" to differentiate. Example: "pig 'fhjgj'", or, "pig \" fhjgj \"" |
% \> |
"%>" In the property ". |
<\ % |
"<%" In the property ". |