请教在servlet中调用applet 怎么设置codebase

lynebao 2005-01-14 10:16:24
servlet放在WEB-INFO\classes csclinet.project
applet 在WEB-INFO\classes animapplets.rect.class

我在servlet中是这么调用的out.println("<applet codebase = \"../\" code=\"animapplets.rect.class\" width=\"400\" height =\"300\"></applet>");

但是显示applet nointiate,我应该怎么设置codebase啊

请各位xdjm帮忙看看,谢谢了
...全文
82 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
lynebao 2005-01-15
  • 打赏
  • 举报
回复
不好意思,我没说清楚,我使用的服务器是weblogic,想开发一个j2ee的应用,这个servlet和applet都被打包成了个war,这是不是就不对了? 如果按照您说的把这个applet打包成jar应该放到哪个目录下面呢?我没看到/root
vcvj 2005-01-14
  • 打赏
  • 举报
回复
there is nothing will be accessed, if you put Applet of the classes at WEB-INF.

you need to know, Applet is running at html(Foreground), so you need to add all of classes (Applet-needed) into a jar, and the label of <applet> points the jar( put at /root)

<html>
<applet code="com.wkf.MainApplet"
width = "500"
height = "300"
archive="wkf.jar"
>
</applet>
</html>
以梦为马 2005-01-14
  • 打赏
  • 举报
回复
友情UP。

81,116

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧