Source:
<code>public void setupMultipart(ServletContextImpl servletContext) { FormEncodedDataDefinition formDataParser = new FormEncodedDataDefinition() .setDefaultEncoding(servletContext.getDeployment().getDefaultRequestCharset().name()); MultipartConfigElement multipartConfig = servletInfo.getMultipartConfig(); if(multipartConfig == null) { multipartConfig = servletContext.getDeployment().getDeploymentInfo().getDefaultMultipartConfig(); } this.multipartConfig = multipartConfig; if (multipartConfig != null) { MultipartConfigElement config = multipartConfig; if (config.getMaxRequestSize() != -1) { maxRequestSize = config.getMaxRequestSize(); } else { maxRequestSize = -1; } final Path tempDir; if(config.getLocation() == null || config.getLocation().isEmpty()) { tempDir = servletContext.getDeployment().getDeploymentInfo().getTempPath(); } else { String location = config.getLocation(); Path locFile = Paths.get(location); if(locFile.isAbsolute()) { tempDir = locFile; } else { final Path baseTmpDir = servletContext.getDeployment().getDeploymentInfo().getTempPath(); tempDir = baseTmpDir == null ? Paths.get(System.getProperty("java.io.tmpdir"), location) <START> : baseTmpDir.resolve(location); <END> } } MultiPartParserDefinition multiPartParserDefinition = new MultiPartParserDefinition(tempDir); if(config.getMaxFileSize() > 0) { multiPartParserDefinition.setMaxIndividualFileSize(config.getMaxFileSize()); } if (config.getFileSizeThreshold() > 0) { multiPartParserDefinition.setFileSizeThreshold(config.getFileSizeThreshold()); } multiPartParserDefinition.setDefaultEncoding(servletContext.getDeployment().getDefaultRequestCharset().name()); formParserFactory = FormParserFactory.builder(false) .addParser(formDataParser) .addParser(multiPartParserDefinition) .build(); } else { formParserFactory = FormParserFactory.builder(false).addParser(formDataParser).build(); maxRequestSize = -1; } }</code><technical_language>DeploymentManagerImpl SecurityActions.getSystemProperty("java.io.tmpdir"), I utility well. This issue a times in places, I if initialize DeploymentInfo.tempDir default SecurityActions.getSystemProperty("java.io.tmpdir") instead of spot-fixing time elsewhere</technical_language>

Target:
public void setupMultipart(ServletContextImpl servletContext) { FormEncodedDataDefinition formDataParser = new FormEncodedDataDefinition() .setDefaultEncoding(servletContext.getDeployment().getDefaultRequestCharset().name()); MultipartConfigElement multipartConfig = servletInfo.getMultipartConfig(); if(multipartConfig == null) { multipartConfig = servletContext.getDeployment().getDeploymentInfo().getDefaultMultipartConfig(); } this.multipartConfig = multipartConfig; if (multipartConfig != null) { MultipartConfigElement config = multipartConfig; if (config.getMaxRequestSize() != -1) { maxRequestSize = config.getMaxRequestSize(); } else { maxRequestSize = -1; } final Path tempDir; if(config.getLocation() == null || config.getLocation().isEmpty()) { tempDir = servletContext.getDeployment().getDeploymentInfo().getTempPath(); } else { String location = config.getLocation(); Path locFile = Paths.get(location); if(locFile.isAbsolute()) { tempDir = locFile; } else { final DeploymentInfo deploymentInfo = servletContext.getDeployment().getDeploymentInfo(); tempDir = deploymentInfo.requireTempPath().resolve(location); } } MultiPartParserDefinition multiPartParserDefinition = new MultiPartParserDefinition(tempDir); if(config.getMaxFileSize() > 0) { multiPartParserDefinition.setMaxIndividualFileSize(config.getMaxFileSize()); } if (config.getFileSizeThreshold() > 0) { multiPartParserDefinition.setFileSizeThreshold(config.getFileSizeThreshold()); } multiPartParserDefinition.setDefaultEncoding(servletContext.getDeployment().getDefaultRequestCharset().name()); formParserFactory = FormParserFactory.builder(false) .addParser(formDataParser) .addParser(multiPartParserDefinition) .build(); } else { formParserFactory = FormParserFactory.builder(false).addParser(formDataParser).build(); maxRequestSize = -1; } }