String encoding = request.getCharacterEncoding();
// check for multipart content types which may have uploaded items
boolean isMultiPart = FileUpload.isMultipartContent(request);
Map multiPartMap = new HashMap();
if (isMultiPart) {
DiskFileUpload upload = new DiskFileUpload();
if (encoding != null) {
upload.setHeaderEncoding(encoding);
}
upload.setSizeMax(maxUploadSize);
List uploadedItems = null;
try {
uploadedItems = upload.parseRequest(request);
} catch (FileUploadException e) {
throw new EventHandlerException("Problems reading uploaded data", e);
}
if (uploadedItems != null) {
Iterator i = uploadedItems.iterator();