Jsp系列例程之二---plugin

<jsp:plugin>动作元素用来动态地下载服务器的Java Bean或Applet到客户端的浏览器上执行,也就是直接在浏览器上执行JAVA程序。其语法格式如下。//plugin.jsp

<jsp:plugin 
type="bean | applet" 
code=" objectCode " 
codebase=" objectCodebase " 
[ name=" ComponentName " ] 
[ archive=" archiveList, ..." ] 
[ align=" alignment " ] 
[height="height" width="width" ] 
[hspace="hspace" vspace="vspace" ] 
[ jreversion=" jreversion " ] 
[ nspluginurl="URLToPlugin" ] 
[ iepluginurl="URLToPlugin" ] > 
[ <jsp:params> 
[ <jsp:param name=PN" value="PV | <%= expression %>]" /> ] 
</jsp:params> ] 
[ <jsp:fallback> text message for user </jsp:fallback> ] 
</jsp:plugin> 

 

<%@ page language="java" contentType="text/html"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>plugIn example</title>
</head>
<body bgcolor="white">
<font color="red">
<h3>当前时间是:</h3>
</font>
<jsp:plugin code="Clock2.class" codebase="applet" type="applet" width="160" height="150">
  <jsp:fallback>您使用的浏览器不支持插件</jsp:fallback>
</jsp:plugin>
<h4>
<font color="blue">通过使用Jsp的插件加载java applet来实现</font>
</h4>
</body>
</html>

 

你可能感兴趣的:(java,html,bean,jsp,浏览器)