private String tempPath = ""; // 临时文件目录
File tempPathFile;
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
User user = (User)request.getSession().getAttribute("user");
uploadPath = this.getServletContext().getRealPath("/")+"pic\\"+user.getUsername();
tempPath = this.getServletContext().getRealPath("/")+"pic\\buffer\\";
init_dir(uploadPath);
response.setContentType("text/html");
response.setCharacterEncoding("utf-8");
request.setCharacterEncoding("utf-8");