if (MultipartFormHandler.isMultipartRequest(externalContext) &&
(externalContext.getRequest() instanceof HttpServletRequest || ExternalContextUtils.isPortlet(externalContext)))
{
try
{
final MultipartFormHandler mfh = new MultipartFormHandler(externalContext);
// TODO: How is this set?
// AdamWiner: looks like the previous Trinidad incarnation
// of this code didn't have any allowed configuration...
mfh.setMaximumAllowedBytes(_maxAllowedBytes);
mfh.setCharacterEncoding(ExternalContextUtils.getCharacterEncoding(externalContext));
final HashMap<String, String[]> parameters = new HashMap<String, String[]>();
MultipartFormItem item;
final UploadedFiles files = new UploadedFiles(externalContext);
while ((item = mfh.getNextPart()) != null)
{
final String name = item.getName();
String value = null;
// No filename - it's not a file uploaded field
if (item.getFilename() == null)