Communication between Java applets has been an interesting topic from the early days of Java. Die Kommunikation zwischen Java-Applets ist ein interessantes Thema aus den frühen Tagen von Java. There are several esoteric ways to communicate like using Javascript as a bridge. Es gibt mehrere Möglichkeiten, esoterische zu kommunizieren wie mit Hilfe von JavaScript als eine Brücke. However we will look into the simplest and most reliable method of intra-applet communication. Aber schauen wir uns in die einfachste und zuverlässigste Methode der Intra-Applet Kommunikation.

Simple solution to applet communication problem Einfache Lösung für Kommunikation Applet Problem
Use a class with static getters and setters method(s) to pass data around. Verwenden Sie eine Klasse mit statischen Absorbentien und Setter-Methode (s) pass auf Daten herum. Since the applets are loaded in the same JVM, the static methods can be used to share any kind of data between the applets. Da die Applets geladen werden in der gleichen JVM, die statische Methoden können genutzt werden, jede Art von Daten zwischen den Applets.

Another more complex solution is to use the database to communicate data between the applets. Eine andere komplexere Lösung ist die Nutzung der Datenbank zu kommunizieren, Daten zwischen den Applets. This may be useful if the applets are on different machines or different JVM’s as in two application server / tomcat instances. Dies kann nützlich sein, wenn die Applets sind in verschiedenen Maschinen oder andere JVM ist, als in zwei Application Server / Tomcat Instanzen.