code: private File getFedoraHomeDir() throws ServletException {
  
          String fedoraHome = Constants.FEDORA_HOME;
          if (fedoraHome == null) {
              failStartup("FEDORA_HOME was not configured properly.  It must be "
                      + "set via the fedora.home servlet init-param (preferred), "
                      + "the fedora.home system property, or the FEDORA_HOME "
                      + "environment variable.", null);
          }
          File fedoraHomeDir = new File(fedoraHome);
          if (!fedoraHomeDir.isDirectory()) {
              failStartup("The FEDORA_HOME directory, " + fedoraHomeDir.getPath()
                      + " does not exist", null);
          }
          File writeTest = new File(fedoraHomeDir, "writeTest.tmp");
          String writeErrorMessage =
                  "The FEDORA_HOME directory, " + fedoraHomeDir.getPath()
                          + " is not writable by " + "the current user, "
                          + System.getProperty("user.name");
          try {
              writeTest.createNewFile();
              if (!writeTest.exists()) {
                  throw new IOException("");
              }
              writeTest.delete();
          } catch (IOException e) {
              failStartup(writeErrorMessage, null);
          }
  
          return fedoraHomeDir;
      }
docs: Validates and returns the value of FEDORA_HOME.
  
  @return the FEDORA_HOME directory.
  @throws ServletException
  if FEDORA_HOME (or fedora.home) was not set, does not denote an
  existing directory, or is not writable by the current user.