JiveJdon Community Forums
在线237人 Home | 论坛 | 培训咨询 | 精华 | 查搜 | 注册 | 登陆 |
首页 » 论坛 » 项目工程开发经验谈
???en_US.forumThreadPrev.name??? 上一主题
Go back to the topic listing   返回主题列表
???en_US.forumThreadNext.name??? 下一主题
这个主题共有 1 回复 / 1 页 [ ]  发表新帖子  回复该主题贴
sunlight2

发表文章: 34
注册时间: 2005年06月03日 10:21
给他发消息
怎么实现同一个jsp页面中嵌入的两个applet之间的通信??急啊,请大家不宁赐教!! 发表: 2005年09月07日 18:00 回复
我的jsp代码如下:(在同一个jsp页面中的)
<jsp:plugin type="applet" codebase="starmap" code="starmap.ZoneMonitorApplet.class" align="left" height="550" width="660" hspace="0" vspace="0" jreversion="1.4" />
<table width="299" height="516" border="0" align="center" cellspacing="1" bgcolor="#0000ff">
<tr>
<td width="295" height="25" bgcolor="#D6E6FC"><div align="center" class="style18">区域监控</div></td>
</tr>
<tr>
<td height="510" bordercolor="0" bgcolor="#D6E6FC" class="a1" cellspacing="1"><div align="center">
<jsp:plugin type="applet" codebase="starmap" name="friend" code="starmap.ZoneMonitorA.class" align="left" height="500" width="300" hspace="0" vspace="0" jreversion="1.4">
<jsp:params>
<jsp:param name="groupterminals" value="<%=gsGroupAndTerminals%>" />
</jsp:params>
<jsp:fallback>在插入Applet时产生错误</jsp:fallback>
</jsp:plugin>
</div></td>
</tr>
</table>

我在ZoneMonitorApplet中用如下方法,试图取得名为”friend“的applet:
ZoneMonitorA talker2=(ZoneMonitorA)getAppletContext().getApplet("friend");
if(talker2==null)
JOptionPane.showMessageDialog(null, "2222", "错误!", -1);
else
{
talker2.setUpLongitudeValue("11111111");
}

结果是talker2==null, 为什么会得不到要通信得applet的对象呢??
sunlight2

发表文章: 34
注册时间: 2005年06月03日 10:21
给他发消息
Re: 怎么实现同一个jsp页面中嵌入的两个applet之间的通信??急啊,请大家不宁赐教!! 发表: 2005年09月07日 18:04 回复
代码变成了页面,我再把代码发一下:


<jsp:plugin type="applet" codebase="starmap" code="starmap.ZoneMonitorApplet.class" align="left" height="550" width="660" hspace="0" vspace="0" jreversion="1.4" />
<table width=
"299" height="516" border="0" align="center" cellspacing="1" bgcolor="#0000ff">
<tr>
<td width=
"295" height="25" bgcolor="#D6E6FC"><div align="center" class="style18">区域监控</div></td>
</tr>
<tr>
<td height=
"510" bordercolor="0" bgcolor="#D6E6FC" class="a1" cellspacing="1"><div align="center">
<jsp:plugin type=
"applet" codebase="starmap" name="friend" code="starmap.ZoneMonitorA.class" align="left" height="500" width="300" hspace="0" vspace="0" jreversion="1.4">
<jsp:params>
<jsp:param name=
"groupterminals" value="<%=gsGroupAndTerminals%>" />
</jsp:params>
<jsp:fallback>在插入Applet时产生错误</jsp:fallback>
</jsp:plugin>
</div></td>
</tr>
</table>

我在ZoneMonitorApplet中用如下方法,试图取得名为”friend“的applet:
ZoneMonitorA talker2=(ZoneMonitorA)getAppletContext().getApplet(
"friend");
if(talker2==null)
JOptionPane.showMessageDialog(null,
"2222", "错误!", -1);
else
{
talker2.setUpLongitudeValue(
"11111111");
}

这个主题有 1 回复 / 1 页 [ ]
???en_US.forumThreadPrev.name??? 上一主题
Go back to the topic listing   返回主题列表    返回页首  返回页首
???en_US.forumThreadNext.name??? 下一主题
热点TAG: AOP cache DDD EJB 集群 设计模式 Hibernate IOC JiveJdon OO RBAC Spring Struts
查询本论坛内 回复超过的热门帖子
快速发表回复
标题
 
粗体 斜体 下划线 插入图片 插入代码 插入url链接 插入附件
内容
 

解惑之道在J道 ,打造中国最具影响力的的企业软件社区
OpenSource JIVEJDON v3.0 Powered by JdonFramework Code © 2002-08 jdon.com

anti spam