How To Communicate Between Java Applets
Communication between Java applets has been an interesting topic from the early days of Java. There are several esoteric ways to communicate like using Javascript as a bridge. However we will look into the simplest and most reliable method of intra-applet communication.
Simple solution to applet communication problem
Use a class with static getters and setters method(s) to pass data around. Since the applets are loaded in the same JVM, the static methods can be used to share any kind of data between the applets.
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.
Filed under Enterprise Software, Headline News, How To, J2EE, Java Software, Javascript, Open Source Software, Programming, Tech Note, Web, Web Services |
|
RSS 2.0 |
Trackback this Article
|
Email this Article
You may also like to read |




































October 22nd, 2007 at 4:12 pm
hi there,
what happens if the JVM applet engine uses different classloaders to load the classes ? there will be 2 different instances of the classes, right ?
BR,
~A
October 22nd, 2007 at 11:12 pm
As far as I know both IE & Firefox loads the applets using the same classloader.
With different classloaders, yes.