Boolean maxLengthExceeded = (Boolean) request.getAttribute(ATTRIBUTE_MAX_LENGTH_EXCEEDED);
if ((maxLengthExceeded != null) && (maxLengthExceeded.booleanValue())) {
return;
}
HdivMultipartException multipartException = (HdivMultipartException) request
.getAttribute(IMultipartConfig.FILEUPLOAD_EXCEPTION);
if (multipartException != null) {
Exception orig = multipartException.getOriginal();
log.error("Failed to parse multipart request", orig);
if (orig instanceof ServletException) {
throw (ServletException) orig;
} else {
throw new ServletException("Failed to parse multipart request", orig);