K
Ken Kast
I've written a small applet that reads and parses various XML files on the
server and creates Documents that are to be manipulated by javascript on the
client. It uses standard javax.xml.* packages out of 1.4.2_04. The applet
and XML files are in a subfolder of the directory where the web page is.
The applet works OK in an applet viewer in the IDE, but when I try to run it
in the browser I get the following error message in the console:
Exception while creating stream: access denied (java.io.FilePermission
C:\Documents and Settings\Ken\My Documents\My
Webs\kenkast\NewsReader\applets\default.opml read)
Here's the code that causes the exception:
public Document XDoc(URL url) {
Document doc = null;
Utilities.msg("XDoc URL: " + url);
try {
Utilities.msg("Try to get a stream");
InputStream in = url.openStream(); // Error occurs here
Utilities.msg("Got a stream");
BufferedInputStream bis = new BufferedInputStream(in);
Here are the two messages before the exception:
XDoc URL:
file:/C:/Documents%20and%20Settings/Ken/My%20Documents/My20Webs/kenkast/NewsReader/applets/default.opml
Try to get a stream
(NewsReader is where the html is.)
Can someone tell me why this doesn't work?
Thanks.
server and creates Documents that are to be manipulated by javascript on the
client. It uses standard javax.xml.* packages out of 1.4.2_04. The applet
and XML files are in a subfolder of the directory where the web page is.
The applet works OK in an applet viewer in the IDE, but when I try to run it
in the browser I get the following error message in the console:
Exception while creating stream: access denied (java.io.FilePermission
C:\Documents and Settings\Ken\My Documents\My
Webs\kenkast\NewsReader\applets\default.opml read)
Here's the code that causes the exception:
public Document XDoc(URL url) {
Document doc = null;
Utilities.msg("XDoc URL: " + url);
try {
Utilities.msg("Try to get a stream");
InputStream in = url.openStream(); // Error occurs here
Utilities.msg("Got a stream");
BufferedInputStream bis = new BufferedInputStream(in);
Here are the two messages before the exception:
XDoc URL:
file:/C:/Documents%20and%20Settings/Ken/My%20Documents/My20Webs/kenkast/NewsReader/applets/default.opml
Try to get a stream
(NewsReader is where the html is.)
Can someone tell me why this doesn't work?
Thanks.