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 <% -- This part of comments will not be seen when viewing the source 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 () %> --> When you view the source code, you 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 ". |