Weiming Zhang wrote:
I included the properties file in the main applet jar that is the first
jar file mentioned in archive statement. But it is still using xerces
parser. Anyway, It seems that my exception is different from the IO
exception mentioned by others. I did sign the applet and the same
approach worked fine with non xml files in my other applets.
java.security.AccessControlException: access denied
(java.io.FilePermission
C:\Documents and Settings\w0zhang\Desktop\myTest.svg read)
This exception has nothing to do with your XML parser.
Applets are simply not allowed to read files from the local machine.
They may only fetch resources from the host they originated from.
Otherwise an Applet could read anything on your machine and send it
back over the Internet.
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.File.isDirectory(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown
Source)
at org.apache.batik.util.ParsedURLData.openStreamInternal(Unknown
Source)
at org.apache.batik.util.ParsedURLData.openStream(Unknown Source)
at org.apache.batik.util.ParsedURL.openStream(Unknown Source)
at
org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown
Source)
On Tue, 2003-12-02 at 11:28, Thomas DeWeese wrote:
Weiming Zhang wrote:
There are two ways to specify the SAX2 parser Batik should use.
The first, which I think most people use is to provide the resource
file:org/apache/batik/util/resources/XMLResourceDescriptor.properties
which should have the following two properties:
How to add the new properties file to the class path? I thought class
path is for class files and jar files. Is there a way to specify it in
the applet html file? All of my jar files are in public_html/Viewer
directory and mentioned in the applet html file.
You can just add the file to one of your jar files like the main
applet jar file (Assuming that comes first).
There are actually three ways, you can also provide an
batik.swing.svg.SVGUserAgent (there are adapters) which has a method:
getXMLParserClassName().
Also I should change the first line to:
org.xml.sax.driver = org.apache.crimson.parser.XMLReaderImpl, right?
Just want to make sure.
Yes.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]