Java/JSP/Applet JSP
Содержание
Jsp Applet Plugin
<source lang="java">
<html>
<title> Plugin example </title> <body bgcolor="white">
Current time is :
<jsp:plugin type="applet" code="Clock2.class" codebase="applet" jreversion="1.2" width="160" height="150" >
<jsp:fallback> Plugin tag OBJECT or EMBED not supported by browser. </jsp:fallback>
</jsp:plugin>
The above applet is loaded using the Java Plugin from a jsp page using the plugin tag.
</body> </html>
</source>
Jsp Call Applet Passing Para
<source lang="java">
<%@ page import="SimpleMenuApplet" %> <% String menuData = ""; %> <jsp:plugin type="applet" code="SimpleMenuApplet" codebase="."
width="250" height="50" jreversion="1.3"
>
<jsp:params> <jsp:param name="font" value="SansSerif" /> <jsp:param name="fsize" value="12" /> <jsp:param name="image" value="Menu.gif" /> <jsp:param name="data" value="<%= menuData %>" /> </jsp:params> <jsp:fallback> Unable to start plugin! </jsp:fallback>
</jsp:plugin>
</source>