dcsimg
writing to a file.
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sean_Campbell
Posted On:   Monday, February 25, 2002 12:00 PM

i am using a web browser to view xml documents. i've embedded applets so the user can alter the file being viewed. so far i successfully open an input stream, read the file into memory, and alter it as necessary. however, as soon as i try to open a FileOutputStream i get a security exception.

the applet and the xml needing to be altered are both on the same machine.

what can i do to write the file in memory to either the existing file or a new tmp file (to be later renamed)? is the applet technology the best solution for what i am doing?

Re: writing to a file.

Posted By:   John_Zukowski  
Posted On:   Tuesday, February 26, 2002 10:49 PM

Opening a FileOutputStream tries to write to the
client's machine. I think you want to write the file
to the server. You need something running on the server
to listen and receive the file to write.

Signing applets is already covered in the FAQ.

Re: writing to a file.

Posted By:   Benoit_Quintin  
Posted On:   Monday, February 25, 2002 12:04 PM

Well, as far as I can tell, the Applet's sandbox is making sure you cannot write to disk with an applet. This is basic internet security (imagine any applet being ale to write to your disk...).

I think you can have a Signed Applet in order to lift some of the security issues off.

About | Sitemap | Contact