How To Communicate Between Java Applets如何沟通之间的Java applets的
Communication between Java applets has been an interesting topic from the early days of Java.之间的沟通, Java applets的已一个有趣的话题,从成立之初的Java 。 There are several esoteric ways to communicate like using Javascript as a bridge.有几个深奥的通信方式一样,使用JavaScript作为一个桥梁。 However we will look into the simplest and most reliable method of intra-applet communication.不过,我们会考虑最简单和最可靠的方法内部Applet的沟通。
Simple solution to applet communication problem 简单的解决办法Applet的沟通问题
Use a class with static getters and setters method(s) to pass data around.使用一类与静态getters和制定方法( )通过数据左右。 Since the applets are loaded in the same JVM, the static methods can be used to share any kind of data between the applets.由于程序加载在同一个JVM的,静态方法可以用来分享任何种类的数据之间的程序。
Another more complex solution is to use the database to communicate data between the applets.另一种更复杂的解决方案是使用数据库进行数据通信之间的程序。 This may be useful if the applets are on different machines or different JVM’s as in two application server / tomcat instances.这可能是有用的,如果程序是在不同的机器或不同的JVM的作为在两个应用服务器/ Tomcat实例。
Filed under提起下 Enterprise Software企业软件 , , Headline News头条新闻 , , How To如何 , , J2EE J2EE的 , , Java Software Java软件 , , Javascript JavaScript的 , , Open Source Software开放源码软件 , , Programming编程 , , Tech Note技术说明 , , Web网页 , , Web Services Web服务 | |
| |
RSS 2.0 2.0 | |
Trackback Trackback跟踪 this Article |此文章|
Email this Article电子邮件此文章
You may also like to read您也可以想读 |





October 22nd, 2007 at 4:12 pm 2007年10月22日在下午4时12分
hi there,喜有,
what happens if the JVM applet engine uses different classloaders to load the classes ?发生什么事,如果JVM的Applet的引擎使用不同的classloaders载入班? there will be 2 different instances of the classes, right ?将有2个不同的实例阶级,对不对?
BR,溴
~A 〜一
October 22nd, 2007 at 11:12 pm 2007年10月22日在下午11时12分
As far as I know both IE & Firefox loads the applets using the same classloader.据我所知,双方即& Firefox的加载程序使用相同的类。
With different classloaders, yes.不同classloaders ,是的。