Java applet - access denied to file on same web server
- by me_here
I've written a simple Java applet to generate a technical image based upon some data in a CSV file. I'm passing in the CSV file as a parameter to the applet:
<applet code = "assaymap.AssayMapApplet" archive = "http://localhost/applet_test/AssayMap.jar" height="600px" width="800px">
<param name="csvFile" value="http://localhost/applet_test/test.csv">
</applet>
As far as I understood applet security restrictions, an applet should be able to read data from the host they're on.
These applets here http://www.jalview.org/examples/applets.html are using the same approach of passing in a text data file as a parameter. So I'm not sure why my own applet isn't working.
The error message I get thrown is:
Error with processing the CSV data.
java.security.AccessControlException: access denied (java.io.FilePermission http:\localhost\applet_test\test.csv read)