java创建建多级目录
解决方法:
String dir = request.getSession().getServletContext().getRealPath("/")+"upload/files";
File dirFile = new File(dir);
//如果路径不存在,新建
if(!dirFile.exists()&&!dirFile.isDirectory()) {
http://www.yayihouse.com/yayishuwu/chapter/1839
}