From: "Tyler Johnson" <tjohnson@braegen.com>
To: java-security@java.sun.com
Date: Fri, 14 May 1999 15:28:00 -0400
Subject: FAQ Confusion
Hi there, I have a quick security question about reading a local file from
an applet using Netscape
In the security FAQ, it says:
"If an applet resides on the client's local disk, and in a directory that
is on the client's
CLASSPATH, then it is loaded by the file system loader. "
That is my situation and so the file system loader should allow the local
applet to load an image file...but I get a security error because
I'm loading the html using a file:/// url. Then I read on in the FAQ to
find this:
"Java-enabled browsers use the applet class loader to load applets
specified with file:
URLs. So, the restrictions and protections that
accrue from the class loader and its
associated security manager are now in effect for
applets loaded via file: URLs.
This means that if you specify the URL like so:
Location:
file:/home/me/public_html/something.html
and the file something.html contains an applet,
the browser loads it using its applet
class loader. "
My question is: If I can't use a file url to to load my local html file
pointing to the applet, how should I be loading it?
It seems strange that the class loader would be used to load applets
specified with a file url. Why not use the file system loader for file
urls?