mreq = new MultipartRequest(req, tempDir, maxSize, "UTF-8");
DiskFileUpload upload = new DiskFileUpload();  try { upload.setRepositoryPath(tempDir); upload.setSizeMax(maxSize); items = upload.parseRequest(req); for (Iterator i = items.iterator(); i.hasNext();) { FileItem item = (FileItem)i.next(); if (item.isFormField()) { parameters.put(item.getFieldName(), item.getString("UTF-8")); } else { parameters.put(item.getFieldName(), item.getName()); fileitems.put(item.getFieldName(), item); filenames.add(item.getName());  String filename = getFilename(item.getName()); item.write(new File(tempDir + File.separator + filename)); } } } catch (Exception e) { throw new IOException(e.getMessage()); }
    public FileUploadRequest(HttpServletRequest req) throws IOException    {        super(req);        original = req;        String tempDir = ConfigurationManager.getProperty("upload.temp.dir");        int maxSize = ConfigurationManager.getIntProperty("upload.max");        mreq = new MultipartRequest(req, tempDir, maxSize, "UTF-8");    }