if ((contentType != null)
&& (contentType.startsWith("multipart/form-data"))
&& (method.equalsIgnoreCase("POST"))) {
// Obtain a MultipartRequestHandler
MultipartRequestHandler multipartHandler = new CommonsMultipartRequestHandler();
if (multipartHandler != null) {
isMultipart = true;
multipartHandler.handleRequest(request);
// stop here if the maximum length has been exceeded
Boolean maxLengthExceeded = (Boolean) request
.getAttribute(MultipartRequestHandler.ATTRIBUTE_MAX_LENGTH_EXCEEDED);
if ((maxLengthExceeded != null)
&& (maxLengthExceeded.booleanValue())) {