String path="http://localhost:8080/mytest/paper/";
File file = new File("http://localhost:8080/mytest/paper/"+datetime+".txt");
FileWriter fileWriter = new FileWriter(file);
fileWriter.write(context);
fileWriter.close();
@"http://localhost:8080/mytest/paper/"无效
------解决方案--------------------
File file = new File(request.getSession().getServletContext().getRealPath("/"+datetime+".txt"));
这里需要一个物理文件,