code: public String getServerPrefix(CmsObject cms, CmsResource resource) {
  
          return getServerPrefix(cms, resource.getRootPath());
      }
docs: Returns the server prefix for the given resource in this site, used to distinguish between
  secure (https) and non-secure (http) sites.<p>
  
  This is required since a resource may have an individual "secure" setting using the property
  {@link org.opencms.file.CmsPropertyDefinition#PROPERTY_SECURE}, which means this resource
  must be delivered only using a secure protocol.<p>
  
  The result will look like <code>http://site.enterprise.com:8080/</code> or <code>https://site.enterprise.com/</code>.<p>
  
  @param cms the current users OpenCms context
  @param resource the resource to use
  
  @return the server prefix for the given resource in this site
  
  @see #getServerPrefix(CmsObject, String)