0 Replies Latest reply on Apr 8, 2002 8:34 AM by Richard Stollar

    Help Please!

    Richard Stollar Newbie

      I have a servlet and I can not get it to write to the local file system.

      I have created a File (f) and a FileWriter (fw) but calling f.canWrite() returns false. Is there some security issues at play here and how can I overcome them?

      code is something like this...

      File f = new File("/tmp/myfile.txt");
      FileWriter fw = new FileWriter(f);
      if (f.canWrite())
      fw.write("hello World");
      else
      System.err.println("Can't Write to file");


      Any help is much appreciated...