A
Andrew Thompson
I am currently puzzling over some applet behavior, and
how to correctly emulate it.
The Appleteer(1) test tool was designed to allow loading of
multiple applets, and looks to provide the normal applet
methods that allow applets to interact.
After failing to load the inter-applet communication demo
at Real's HowTo(2), a prompt from Daniel Pitts(3) identified
the underlying problem as resulting from the applet classes
being loaded by separate URLClassLoaders (one for each
applet, in the case of Appleteer).
I thought at first that the answer was to create a single
URLClassLoader that references all resources listed in every
applet element on the web page, but this would also present
problems for identically named resources in different Jar
archives.
Having said that, neither IE 7, nor Moz 3.0.5 is the slightest
bit confused as to which resource belongs to which applet, as
can be seen in the simple applet that appears twice in the
test page(4).
The top applet reads the property/text from the top.zip, and
the lower applet reads the property from bottom.zip.
How do they do it, while still allowing applets to communicate?
(1) <http://pscode.org/appleteer/>
(2) <http://www.rgagnon.com/examples/java-0022.html>
(3) <http://groups.google.com/group/comp.lang.java.programmer/msg/
2334e3948b2bf631>
(4) <http://pscode.org/test/appletresource/applet.html>
how to correctly emulate it.
The Appleteer(1) test tool was designed to allow loading of
multiple applets, and looks to provide the normal applet
methods that allow applets to interact.
After failing to load the inter-applet communication demo
at Real's HowTo(2), a prompt from Daniel Pitts(3) identified
the underlying problem as resulting from the applet classes
being loaded by separate URLClassLoaders (one for each
applet, in the case of Appleteer).
I thought at first that the answer was to create a single
URLClassLoader that references all resources listed in every
applet element on the web page, but this would also present
problems for identically named resources in different Jar
archives.
Having said that, neither IE 7, nor Moz 3.0.5 is the slightest
bit confused as to which resource belongs to which applet, as
can be seen in the simple applet that appears twice in the
test page(4).
The top applet reads the property/text from the top.zip, and
the lower applet reads the property from bottom.zip.
How do they do it, while still allowing applets to communicate?
(1) <http://pscode.org/appleteer/>
(2) <http://www.rgagnon.com/examples/java-0022.html>
(3) <http://groups.google.com/group/comp.lang.java.programmer/msg/
2334e3948b2bf631>
(4) <http://pscode.org/test/appletresource/applet.html>