code: public static void extractParameterMap(final HttpServletRequest request, final Map<String, String[]> parameters,
  			final Map<String, FileItem[]> files) {
  
  		if (isMultipart(request)) {
  			ServletFileUpload upload = new ServletFileUpload();
  			upload.setFileItemFactory(new DiskFileItemFactory());
  			try {
  				List fileItems = upload.parseRequest(request);
  
  				uploadFileItems(fileItems, parameters, files);
  			} catch (FileUploadException ex) {
  				throw new SystemException(ex);
  			}
  			// Include Query String Parameters (only if parameters were not included in the form fields)
  			for (Object entry : request.getParameterMap().entrySet()) {
  				Map.Entry<String, String[]> param = (Map.Entry<String, String[]>) entry;
  				if (!parameters.containsKey(param.getKey())) {
  					parameters.put(param.getKey(), param.getValue());
  				}
  			}
  		} else {
  			parameters.putAll(request.getParameterMap());
  		}
  	}
docs: Extract the parameters and file items allowing for multi part form fields.
  
  @param request the request being processed
  @param parameters the map to store non-file request parameters in.
  @param files the map to store the uploaded file parameters in.