将文件上传到tomcat
//deviceimages随便取,在tomcat会新建String realpath = ServletActionContext.getServletContext().getRealPath("/deviceimages"); System.out.println("realpath: "+realpath);//devicepic是input file中的name