code: protected boolean isSitePathValid() {
  
          try {
              CmsObject cmsLocal = OpenCms.initCmsObject(m_cms);
              cmsLocal.getRequestContext().setSiteRoot((String)m_site.getValue());
              if (m_startfolder.getValue().length() <= ((String)m_site.getValue()).length()) {
                  return false;
              }
              return cmsLocal.existsResource(m_startfolder.getValue().substring(((String)m_site.getValue()).length()));
          } catch (CmsException e) {
              LOG.error("Unabel to ini CmsObject", e);
              return false;
          }
      }
docs: Checks if the given path is valid resource in site.<p>
  
  @return true if the resource is valid