background image

Including an Applet

<< Transferring Control to Another Web Component | Duke's Bookstore with Applet >>
<< Transferring Control to Another Web Component | Duke's Bookstore with Applet >>

Including an Applet

{ archive=
"archiveList" }
{ height=
"height" }
{ hspace=
"hspace" }
{ jreversion=
"jreversion" }
{ name=
"componentName" }
{ vspace=
"vspace" }
{ width=
"width" }
{ nspluginurl=
"url" }
{ iepluginurl=
"url" } >
{ <jsp:params>
{ <jsp:param name=
"paramName" value= paramValue" /> }+
</jsp:params> }
{ <jsp:fallback>
arbitrary-text </jsp:fallback> }
</jsp:plugin>
The jsp:plugin tag is replaced by either an <object> or an <embed> tag as appropriate for the
requesting client. The attributes of the jsp:plugin tag provide configuration data for the
presentation of the element as well as the version of the plug-in required. The nspluginurl and
iepluginurl
attributes override the default URL where the plug-in can be downloaded.
The jsp:params element specifies parameters to the applet or JavaBeans component. The
jsp:fallback
element indicates the content to be used by the client browser if the plug-in
cannot be started (either because <object> or <embed> is not supported by the client or because
of some other problem).
If the plug-in can start but the applet or JavaBeans component cannot be found or started, a
plug-in-specific message will be presented to the user, most likely a pop-up window reporting a
ClassNotFoundException
.
The Duke's Bookstore page /template/prelude.jspf creates the banner that displays a
dynamic digital clock generated by DigitalClock (see
Figure 5­3
).
Including an Applet
Chapter 5 · JavaServer Pages Technology
177