root=request.getSession().getServletContext().getRealPath("/upload/aaa") ;//项目发布路径(request.getRealPath()已经过时)
 
//新建文件夹
    File folder=new File(root);
    if (!folder.isDirectory()) {
      folder.mkdir();
    }
    
    //新建文件
    File copyFlie=new File(root,fileFileName);