1 Reply Latest reply on Apr 8, 2002 10:41 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");
      System.err.println("Can't Write to file");

      Any help is much appreciated...