code: public CmsObject createRootCms(CmsObject cms) throws CmsException {
  
          CmsObject rootCms = OpenCms.initCmsObject(cms);
          Object logEntry = cms.getRequestContext().getAttribute(CmsLogEntry.ATTR_LOG_ENTRY);
          if (logEntry != null) {
              rootCms.getRequestContext().setAttribute(CmsLogEntry.ATTR_LOG_ENTRY, logEntry);
          }
          rootCms.getRequestContext().setSiteRoot("/");
          return rootCms;
      }
docs: Copies a given CMS context and set the copy's site root to '/'.<p>
  
  @param cms the CMS context to copy
  @return the copy
  
  @throws CmsException if something goes wrong