Java applet - access denied to file on same web server

Posted by me_here on Stack Overflow See other posts from Stack Overflow or by me_here
Published on 2010-03-26T12:51:02Z Indexed on 2010/03/26 12:53 UTC
Read the original article Hit count: 373

Filed under:
|
|

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)

© Stack Overflow or respective owner

Related posts about java

Related posts about applet