I try to parse(via SAX) an xml file on a server using an applet. Even though
the file resides on the applet's host and the directory has sufficient
permission, I get an access denied exception.
Below you see what I'm trying to do:
xmlURI = "http://hgbc01/Do/Download/temp24.xml";
InputSource inputSource = new InputSource(new java.io.FileInputStream(
new java.io.File(xmlURI)));
inputSource.setSystemId(xmlURI);
reader.parse(inputSource);
}
I get the following error:
java.security.AccessControlException: access denied (java.io.FilePermission
http:\hgbc01\Do\Download\temp24.xml read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkRead(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at model.XMLParser.parse(XMLParser.java:60)
at gui.JIVApplet.jbInit(JIVApplet.java:51)
at gui.JIVApplet.init(JIVApplet.java:36)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Any idea about what's wrong there? Thanks!
Cheers,
Marko