code: private static File getFileUploadDirectory(ServletContext servletContext) throws FileNotFoundException {
  		File uploadDir = new File(
  			(File)servletContext.getAttribute(ServletContext.TEMPDIR),
  			"uploads"
  		);
  		if(
  			!uploadDir.exists()
  			&& !uploadDir.mkdirs()
  			// Check exists again, another thread may have created it and interfered with mkdirs
  			&& !uploadDir.exists()
  		) {
  			throw new FileNotFoundException(uploadDir.getPath());
  		}
  		return uploadDir;
  	}
docs: Gets the upload directory.