req.setCharacterEncoding(encoding);
boolean isGetMethod = ("GET".equalsIgnoreCase(req.getMethod()));
boolean isMultipart = (!isGetMethod && contentType != null && contentType
.toLowerCase().startsWith("multipart/"));
if (isMultipart) {
JWebLiteApplication application = JWebLiteApplication.get();
long maxFileSize = application.getFilterConfig()
.getFileUploadSizeMax();
initMultipartRequest(req, encoding, maxFileSize);
} else {
initHTTPRequest(req, encoding);
}