<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> |
Detailed explanation of properties :
Property | usage |
type = “bean | applet” | The type of object that the plug-in will execute. You must specify one in the bean or applet because there is no default value for this property. |
class=” classFileName ” | The name of the JAVA class file that the plug-in will execute. You must include the extension in the name. And this file must be in the directory specified with the "codebase" attribute. |
codebase="classFileDirectoryName" | The directory containing the JAVA classes that the plug-in will run from, or the path to this directory. The default is the path of this JSP file. |
name=”instanceName” | The name of the instance of the bean or applet. Makes communication between beans or applets called by the same JSP file possible. |
archive = “URLToArchive,…” | Comma separated list of pathnames. Is the path name of the archive files that are preloaded by the class loader in the directory specified by codebase. Typically, these archive files are securely loaded over the network and can significantly improve the performance of the applet. |
Syntax | purpose |
<%--Comment--%> | Comment in JSP format. Will be ignored by the JSP-to-scriptlet compiler. Any embedded JSP scripting elements, directives, or acts will be ignored. example: <%@ page language="java" %> <html> <head><title>A Comment Test</title></head> <body> <h2>A Test of Comments</h2> <%-- This part of the comment will not be seen when viewing the source code--%> </body> </html> |
<!-- Comment--> | Comment in HTML form. Passed directly to the final HTML. Any embedded JSP scripting elements, directives, or acts will be executed normally. example: <!-- This page was loaded on <%= (new java.util.Date()).toLocaleString() %> --> When viewing the source code you will see: <!-- This page was loaded on January 1, 2000 --> |
<% | In template text (static HTML), please write this when you want to output this special symbol (<%) on the page. |
%> | is used in scripting elements and has a similar effect to the "</%" above. |
' | indicates the character "'" in the attribute using "'". Of course, you can also use """ as a distinction. For example: 'pig"fhjgj" ', or, 'pig'fhjgj'' |
" | indicates that the character """ is used in the attribute using """. Of course, you can also use "'" as a distinction. Example: "pig'fhjgj'", or, "pig"fhjgj"" |
%> | "%>" in the attribute. |
<% | "<%" in the attribute. |