List<?> fileItems;
try {
fileItems = fileUpload.parseRequest(request);
} catch (FileUpload.SizeLimitExceededException e) {
throw new UploadSizeLimitExceededException(e);
} catch (FileUpload.FileSizeLimitExceededException e) {
throw new UploadSizeLimitExceededException(e);
} catch (FileUploadException e) {
throw new UploadException(e);
}
return fileItems.toArray(new FileItem[fileItems.size()]);