// String path = getClass().getProtectionDomain().getCodeSource().getLocation().getPath();
String s = dateFormat.format(new Date());
String path = request.getSession().getServletContext().getRealPath("/");
// System.out.println(path);
File file = new File(path + "uploads/" + s);
if(!file.exists()){
// System.out.println(file.getName() + "不存在");
// 创建文件夹,如果要创建文件: file.createNewFile()
if(file.mkdir()){ System.out.println("创建成功"); }
else{ System.out.println("创建失败"); }
}