Search code examples
javatomcatportjapplet

Can a JApplet Listen on a Port and Write on an other one?


Allright here is my problem I am currently devlopping a JApplet and a Application. Basicaly when the machine will start the Application will launch and you wont be able to see anything else. on the same machine a Appache Tomcat Server will be running to give access to the JApplet via the network. So the JApplet isn't necessarily there at all time. So i was wondering if it was possible for the Application to listen to a given port, so that when the JApplet comes online it would say on the port like "hey i am online do something about it!". Also is it possible for the Application to talk back to the JApplet on a port. So that they can both talk to each other.

If this is not clear I can make a Diagram to clarify the needs but basicaly is it possible for them to talk to each other? If they can, How do they do it?

Thank you!


Solution

  • An applet can connect to and listen on any port as long as it's signed.

    See what applets can or can't do:

    http://docs.oracle.com/javase/tutorial/deployment/applet/security.html