CommonsMultipartResolver commonsMultipartResolver = new CommonsMultipartResolver(request.getSession().getServletContext()); boolean isMultipart = ServletFileUpload.isMultipartContent(request); if(isMultipart){ } if (commonsMultipartResolver.isMultipart(request)){ boolean multipart = commonsMultipartResolver.isMultipart(request); System.out.println(multipart); }