MultiPartConfig facesServletMultiPartConfig = null;
String appConfigAttrName = ApplicationConfig.class.getName();
Map<String, Object> applicationMap = externalContext.getApplicationMap();
ApplicationConfig applicationConfig = (ApplicationConfig) applicationMap.get(appConfigAttrName);
WebConfig webConfig = applicationConfig.getWebConfig();
List<ConfiguredServlet> configuredServlets = webConfig.getConfiguredServlets();
for (ConfiguredServlet configuredServlet : configuredServlets) {
if (FACES_SERVLET_FQCN.equals(configuredServlet.getServletClass())) {
facesServletMultiPartConfig = configuredServlet.getMultiPartConfig();