applet和一般的class不一样,一般需要调用的class都是放在了WEB-INF/classes下面,或者WEB-INF/lib下面。
但是网页寻找applet的方式和寻找一般html文件一样。
- 网页和调用的applet在同一个目录的情况
<applet code=Test.class width="100" height="100">
</applet>
- 网页和调用的applet在不同目录的情况,使用codeBase指定applet所在目录
<applet code=Test.class codeBase="javaChart" width="100" height="100">
</applet>
- applet打包在jar文件的情况,使用archives指定jar文件
<applet code=Test.class codeBase="javaChart" archives="test.jar" width="100" height="100">
</applet>