Click to See Complete Forum and Search --> : File I/O


Jason Teagle
March 8th, 1999, 02:29 AM
I would like to be able to create and maintain a small text file on the server from which the applet runs, i.e. local to the applet. The file would contain information I want to keep persistent, such as a counter's current count, for example. The problem is, when I try to create the DataInputStream or DataOutputStream I get a security exception thrown.


How am I supposed to maintain persistent data if I can't use a file? It's not like I'm trying to store it on the user's PC, I'm trying to store it on the applet's server! What am I missing? Or is there a better way to do what I want?

Mark
March 14th, 1999, 10:09 AM
Jason,

You should be able to this.


The first things I'd check are:

1.) Are you sure you have "create/write" rights on the web server?


2.)Have you successfully read a text file from this server already (basically do you have the file paths right?)


Post the the code snippet here and I'll take a look.


Mark

Jason Teagle
March 15th, 1999, 02:04 AM
Mark: Thanks for the offer, but I am now told that you can't do file I/O from an applet. My server certainly isn't going to give me file access. So much for Java.


"Java is pooh"