I've designed an applet that connects to a custom server running on the same machine as the webserver. There aren't any issues making the actual connection. The question I have, however, is how to properly find the webserver hostname without hard-coding it into the applet. As I see it (and there are other ways please add) there are two ways to set the desired webserver hostname:
1) As a parameter to the applet coded into the applet on the HTML file. For example: <param name=host value='hostname'> 2) The applet could look up the server's hostname
Option 1 works fine but is there an easy way to look up the webserver's hostname from within an Applet as in option 2?