1、可在以HTML网页中,利用applet标记来指定小应用程序。
<html>
<head>
<title>APPLETEXAMPLE</title>
</head>
<body>
<h2>这是一个小应用程序</h2>
<Applet Code="helloworld.class" width=200height=100>
</Applet>
2、当浏览器分析到一个Applet标记时,向该标记中指定的HTTP服务器发送一个请求,如果标记没有指定HTTP服务器,默认向当前服务器发出请求。
GET /applets/HelloWorld.class HTTP/1.1
<空行>
HTTP服务器定位helloworld类文件,在HTTP响应中,将该文件的内容发送给客户。