文件上传

文件上传

         FileWriter writer;
         try {
          String path = System.getProperty("user.dir")+"/../webapps/sxzx/formfiles/"+session.get("objectID")+".txt";
             writer = new FileWriter(path);
             writer.write(content);
             writer.flush();
             writer.close();
         } catch (IOException e) {
             e.printStackTrace();
         }

你可能感兴趣的:(文件上传)