How can an unsigned applet retrieve a file from the same web server that it was downloaded from?
An unsigned applet can open a connection only to the server from which it was downloaded, otherwise security exceptions will occur. The following code creates an applet with a text area that sends an HTTP request to the web server to establish a connection with the file resource. Java.io.BufferedReader reads the file one line at a time, and each line is displayed on the applet’s text area.