code: public static Map<String, String[]> readParameterMapFromMultiPart(
          String encoding,
          List<FileItem> multiPartFileItems) {
  
          Map<String, String[]> parameterMap = new HashMap<String, String[]>();
          Iterator<FileItem> i = multiPartFileItems.iterator();
          while (i.hasNext()) {
              FileItem item = i.next();
              String name = item.getFieldName();
              String value = null;
              if ((name != null) && (item.getName() == null)) {
                  // only put to map if current item is no file and not null
                  try {
                      value = item.getString(encoding);
                  } catch (UnsupportedEncodingException e) {
                      LOG.error(Messages.get().getBundle().key(Messages.LOG_ENC_MULTIPART_REQ_ERROR_0), e);
                      value = item.getString();
                  }
                  if (parameterMap.containsKey(name)) {
  
                      // append value to parameter values array
                      String[] oldValues = parameterMap.get(name);
                      String[] newValues = new String[oldValues.length + 1];
                      System.arraycopy(oldValues, 0, newValues, 0, oldValues.length);
                      newValues[oldValues.length] = value;
                      parameterMap.put(name, newValues);
  
                  } else {
                      parameterMap.put(name, new String[] {value});
                  }
              }
          }
          return parameterMap;
      }
docs: Creates a "standard" request parameter map from the values of a
  <code>multipart/form-data</code> request.<p>
  
  @param encoding the encoding to use when creating the values
  @param multiPartFileItems the list of parsed multi part file items
  
  @return a map containing all non-file request parameters
  
  @see #readMultipartFileItems(HttpServletRequest)