Contact: Web / Voice / Email / Tips
Simple Thoughts Blog - Java and Web Technologies

Simple solutions for complex problems.

 

How To Communicate Between Java Applets

October 22nd, 2007 by Angsuman Chakraborty

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

2 Responses to “How To Communicate Between Java Applets”

  1. anjan bacchu Says:

    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

  2. Angsuman Chakraborty Says:

    As far as I know both IE & Firefox loads the applets using the same classloader.

    With different classloaders, yes.

Looking forward to hear your thoughts.



Please enter the code shown below ( to verify that you are human ) before you click Submit Comment.

No. 1 method to ethically increase your blog traffic and reach.

Translate

Translate to EnglishÜbersetzen Sie zum Deutsch/GermanPřeložit do Čech/CzechOversætte hen til Dansk/DanishKääntää jotta Finnish/FinnishLefordít -hoz Magyar/HungarianÞýða til Íslenska/IcelandicTraducir a Latinoamericano Español/Latin American Spanishtagapagsalin sa Filipino/FilipinoTłumaczyć wobec Polski/PolishA traduce la spre Român/RomanianPrevesti za Srpski/Serbiantolmačiti v slovenski/SlovenianÖversätta till Svensk/SwedishChyfieitha at Cymraeg/Welshtercüme etmek -e doğru Türk/TurkishPrevesti to Hrvatski/CroatianПревеждам към Българин/BulgarianTraduzca al Español/SpanishTraduisez au Français/FrenchTraduca ad Italiano/ItalianTraduza ao Português/Portuguese日本語に翻訳しなさい /Japanese한국어에게 번역하십시오/Korean中文翻译/Chinese Simplifiedترجمة الى العربية/ArabicVertaal aan het Nederlands/DutchΜεταφράστε στα ελληνικά/GreekПереведите к русскому/RussianOversetter til Norsk/Norwegian中文翻译/Chinese TraditionalTraduzir a Língua portuguesa brasileira/Brazilian PortugueseReddo ut Latin/Latin

Taragana Network

»Ctrl-S
»Enterprise Blog
»Free Book on Eye Care by Natural Therapy
»Health Care Blog
»Hot Computer Jobs Blog
»Pet Care & Grooming News and Tips
»Phil Law Blog
»Taragana - Software Outsourcing
»The Angsuman Chakraborty Blog
»The Diabetes Cure Blog
»The Eye Treatment Blog
»The Stem Cell Blog
»Weblog Hosting Blog
"The most beautiful thing we can experience is the mysterious. It is the source of all true art and all science. He to whom this emotion is a stranger, who can no longer pause to wonder and stand rapt in awe, is as good as dead: his eyes are closed." - Albert Einstein