Object value;
if (aParsed_request.isFormField()) {
try {
value = aParsed_request.getString("UTF-8");
} catch (UnsupportedEncodingException e) {
throw new JWIGException(e);
}
} else {
value = new FileField(aParsed_request);
}
List<Object> ps = paramslists.get(name);
if (ps == null) {
ps = new ArrayList<Object>();
paramslists.put(name, ps);
}
ps.add(value);
}
Map<String, Object[]> params = new HashMap<String, Object[]>();
for (Map.Entry<String, List<Object>> es : paramslists.entrySet()) {
params.put(es.getKey(), es.getValue().toArray());
}
return params;
} catch (FileUploadException e) {
throw new JWIGException(e);
}
} else {
if (request.getCharacterEncoding() == null) {
try {
request.setCharacterEncoding("UTF-8");
} catch (UnsupportedEncodingException e) {
throw new JWIGException(e);
}
}
return request.getParameterMap();
}
}