[java] applet to applet communication
I have been trying to come up with ways that I can have two applets running under the same web browser, but different pages communicate.
1 - Using getAppletContext().getApplet( ... )
2 - Opening some sockets and sending data back and forth
3 - Using java-script as the messanger, requires some
LiveConnect or something like that plugin.
First off, #1 is a no no, because the java specs say that you can''t have two java apps communicating if they exist on different
html pages ( mine do ). Some browsers support it, but not all.
#2 - no probs with this yet
#3 - I don''t want the user to have to download a plugin...
Have I missed any other ways, The two java applets are different applets, so I can''t create any Static variables and communicate that way either.
ao
Play free Java games at: www.infinitepixels.com
Here is a tut on that subject at JavaWorld.
Cheers, JP.
==============================================
I feel like a kid in some kind of store...
==============================================
www.thejpsystem.com
Cheers, JP.
==============================================
I feel like a kid in some kind of store...
==============================================
www.thejpsystem.com
==============================================I feel like a kid in some kind of store... ============================================== www.thejpsystem.com
Thanks for the link. I''m a little stuck though. I don''t know if you have tried out the code, but somethings not working right. I don''t see the result of changing the static variable throughout all the applets? I made sure the applets were all in the same codebase and all that... So I''m a little stuck on that.
Anyone else have any luck with this stuff?
ao
Anyone else have any luck with this stuff?
ao
Play free Java games at: www.infinitepixels.com
Hmmm, ok after a little tinkering it appears as though it works if the class files aren't all packed up into a jar or cab file. Well that sucks, because I need to do some networking stuff and thus require a signed cab or jar file. Boy oh boy, why does java always find a way to really really piss me off.
Another thing that pisses me off is that I hear you should be able to open a socket to the server from which the applet originated without requiring permission from the user. This does not seem to work for me either, If I could solve that problem then I would just leave them as classes and I could use the static varibables to communicate. arrrrrrrrrrrrrrr!!!!!
ao
Edited by - ao on December 19, 2000 12:33:28 AM
Another thing that pisses me off is that I hear you should be able to open a socket to the server from which the applet originated without requiring permission from the user. This does not seem to work for me either, If I could solve that problem then I would just leave them as classes and I could use the static varibables to communicate. arrrrrrrrrrrrrrr!!!!!
ao
Edited by - ao on December 19, 2000 12:33:28 AM
Play free Java games at: www.infinitepixels.com
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement