docs: public String getRealPath(String path, boolean checkDocRoot)
    {
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE))
            logger.entering(CLASS_NAME, "getRealPath", new Object[]{path, checkDocRoot});
        
        //if (webAppInfo != null)
        //{
            // return "bundleresource:";
        //}
         
      String basePath = null;
  
      if (path == null || path.equals("")) {
          path = "/";
      }
        
      if(container != null){
          
          boolean pathIsBackslash = false;
          if (path.contains("\\")) {
              if (path.equals("\\")) {
                  pathIsBackslash = true;
              }
              path=path.replace("\\", "/");
          }
          
          if (path.equals("/")) {
              String physicalPath = container.getPhysicalPath();
              
              if (physicalPath == null) { // loose app might return null here
                  return null;
              }        
  
              File file = new File(physicalPath);
              if (!file.exists() || !file.isDirectory()){ //might be a xxx.war, so return null if it is an archive
                  return null;
              }
              
              if(pathIsBackslash == true){
                  // add backslash back on to the end so there will be a \ at the end.
                  // Need to do this to maintain compatibility with twas
                  // PM70146
                  physicalPath = physicalPath + "\\"; 
                  return physicalPath;
              }          
              
              //getAbsolutePath always return a file path without slash in the end, even the file is a directory.
              return file.getAbsolutePath();
          }
          
          try {
              Entry entry = container.getEntry(path);
              if(entry != null){
                  String s = entry.getPhysicalPath();
                  // if passed in path ends in separator, then make sure return value does also
                  if ( (s != null) && (path.length()>1 && path.endsWith("/") &&(s.charAt(s.length() - 1) != File.separatorChar)) ) {
                      s = s + File.separator;
                  }
                  return s;
  
              } else {
                  if (checkDocRoot == false) {
                      return null;
                  }
                  
                  DocumentRootUtils dru = getDocumentRootUtils(path);
                  
                  if (dru != null) {
                      if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE))
                          logger.logp(Level.FINE, CLASS_NAME, "getRealPath", "obtained dru");
                      
                      dru.handleDocumentRoots(path, WCCustomProperties.CHECK_EDR_IN_GET_REAL_PATH);
                      EntryResource er = dru.getMatchedEntryResource();
  
                      if (er != null) {
                          if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE))
                              logger.logp(Level.FINE, CLASS_NAME, "getRealPath", "obtained er: " + er);
                          Entry ety = er.getEntry();
                          if (ety != null) {
                              if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE))
                                  logger.logp(Level.FINE, CLASS_NAME, "getRealPath", "obtained entry: " + ety);
                              
                              String s = ety.getPhysicalPath();
                              if ((s != null) && (s.length()> 0)) {
                                  if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE))
                                      logger.logp(Level.FINE, CLASS_NAME, "getRealPath", "getPhysicalPath() is: " + s);
                                  // if passed in path ends in separator, then make sure return value does also
                                  if (  (path.endsWith("/"))
                                      &&(s.charAt(s.length() - 1) != File.separatorChar)) {
                                      s = s + File.separator;
                                  }
                                  return s;
                              } else {
                                  // to be TWAS compliant, return container path if we are not checking EDRs and can't find the real path
                                  //if the app was extracted, we could return the physical path
                                  if (WCCustomProperties.CHECK_EDR_IN_GET_REAL_PATH == false) {
                                      basePath = container.getPhysicalPath();
                                  }
                              }
                          }
                      }
                      else{
                          File matchedFile = dru.getMatchedFile();
                          if (matchedFile != null){
                              if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE))
                                  logger.logp(Level.FINE, CLASS_NAME, "getRealPath", "obtained file [" + matchedFile.getAbsolutePath() +"]"); 
                              return matchedFile.getAbsolutePath();
                          }
                      }
                  }
              }
          } catch(IllegalArgumentException e){
              logger.logp(Level.FINE, CLASS_NAME, "getRealPath", "caught IllegalArgument Exception. path: " + path + "  Exception: " + e);
              return null;
          } catch(IOException e){
              logger.logp(Level.FINE, CLASS_NAME, "getRealPath", "caught IOException processing document root getReadPath: " + path + "  Exception: " + e);
  
              // to be TWAS compliant, return container path if we are not checking EDRs and can't find the real path
              // but return null if we are checking EDRs and can't find the real path
              if (WCCustomProperties.CHECK_EDR_IN_GET_REAL_PATH) {
                   return null;
              }
              //if the app was extracted, we could return this...
              basePath = container.getPhysicalPath();
           }
          
      }
      
      if (basePath == null) {
          return null;
      }
  
      basePath = basePath.replace('\\', '/');
      
      if (File.separatorChar!='/') {
          basePath = basePath.replace('/', File.separatorChar);
          path = path.replace('/', File.separatorChar);
      }
  
      String realPath = "";
      
      if (path.charAt(0) == File.separatorChar) { 
          realPath = basePath + path;
      } else {
          realPath = basePath + File.separatorChar + path;
      }
      
      return realPath;
    }