code: private static String getContextRootPath(CmsObject cms, String creationSitemap) {
  
          String path = null;
          if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(creationSitemap)) {
              try {
                  path = cms.readFolder(creationSitemap).getRootPath();
              } catch (CmsException e) {
                  LOG.warn("The provided creation sitemap " + creationSitemap + " is not a VFS folder.", e);
              }
          }
          if (path == null) {
              path = cms.addSiteRoot(cms.getRequestContext().getFolderUri());
          }
  
          return path;
      }
docs: Returns the context root path.<p>
  
  @param cms the CMS context
  @param creationSitemap the creation sitemap parameter
  
  @return the context root path