Problems accessing xml files included in applet jar with Netscape 4.7-6.0.
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Andrew_Watson
Posted On:   Tuesday, September 4, 2001 05:11 AM

Hi I have created an applet jar file which contains a msg.xml plain text XML file.
If I try to access the file via MyApplet.getClass().getResourceAsStream(filename) a security exception is thrown.
I am pretty convinced the code is correct because it works with IE.
Is there any specific issue with Netscape?

Re: Problems accessing xml files included in applet jar with Netscape 4.7-6.0.

Posted By:   harald_braun  
Posted On:   Tuesday, September 4, 2001 10:41 AM

Hi,

YES it's funny, Netscape seem to have a typo...

There are some restrictions about the file extension that can be used within a jar file. You will find a list of the permitted extensions at Netscape Web site:


http://developer.netscape.com/docs/technote/java/getresource/getresource.html


It contains a list of unrestricted resources, which are generally accessible file extensions. If you check for xml, you will find ... nothing!
Well, they have xlm, which is a Microsoft Excel macro extension, which I don't think anybody would need in a jar file.
The best you can do is to change "xml" to "txt"?
I've quickly tried it and it works fine.

HTH

Re: Problems accessing xml files included in applet jar with Netscape 4.7-6.0.

Posted By:   John_Zukowski  
Posted On:   Tuesday, September 4, 2001 07:12 AM

That is supposed to work, or at least it did with 4.7. I haven't tried this with 6.x.
About | Sitemap | Contact