docs: public void init() throws ServletException {
          // Get the name of the upload directory.
          String uploadDirParam = getInitParameter("uploadDir");
  
          if (!StringUtil.isEmpty(uploadDirParam)) {
              try {
                  URL uploadDirURL = getServletContext().getResource(uploadDirParam);
                  uploadDir = FileUtil.toFile(uploadDirURL);
              }
              catch (MalformedURLException e) {
                  throw new ServletException(e.getMessage(), e);
              }
          }
  
          if (uploadDir == null) {
              uploadDir = ServletUtil.getTempDir(getServletContext());
          }
      }