UploadListener listener = new UploadListener(request.getContentLength());
listener.start();//启动监听状态
//将监听器对象的状态保存在Session中
session.setAttribute("FILE_UPLOAD_STATS", listener.getFileUploadStats());
//创建MonitoredDiskFileItemFactory对象
FileItemFactory factory = new MonitoredDiskFileItemFactory(listener);
//通过该工厂对象创建ServletFileUpload对象
ServletFileUpload upload = new ServletFileUpload(factory);
//将转化请求保存到list对象中
List items = upload.parseRequest(request);
//停止使用监听器