code: public static InputStream openConfigurationFile(String filepath, ClassLoader classLoader) throws FileNotFoundException {
          File file = getConfigurationFile(filepath);
          if (file.exists()) {
              logger.info("Located configuration file: " + file.getAbsolutePath());
              return new FileInputStream(file);
          }
  
          // last resort is classLoader classpath
          InputStream is = classLoader.getResourceAsStream(filepath);
          if (is == null) {
              if (ApplicationContext.getDeployPath() != null) {
                  // try META-INF/mdw
                  String deployPath = ApplicationContext.getDeployPath();
                  if (!deployPath.endsWith("/"))
                      deployPath += "/";
                  file = new File(deployPath + "META-INF/mdw/" + filepath);
                  if (file.exists()) {
                      logger.info("Located configuration file: " + file.getAbsolutePath());
                      is = new FileInputStream(file);
                  }
              }
  
              if (is == null)
                  throw new FileNotFoundException(filepath);  // give up
          }
          return is;
      }
docs: Open configuration file. If Java system property mdw.config.location is defined,
  and the file exists in that directory, it will load the file. Otherwise it loads through
  the class path.
  @param filepath
  @param classLoader
  @return Input steam of the file
  @throws FileNotFoundException if the file is not found