code: public String getServerPrefix(CmsObject cms, String resourceName) {
  
          if (resourceName.startsWith(cms.getRequestContext().getSiteRoot())) {
              // make sure this can also be used with a resource root path
              resourceName = resourceName.substring(cms.getRequestContext().getSiteRoot().length());
          }
          boolean secure = OpenCms.getStaticExportManager().isSecureLink(
              cms,
              resourceName,
              cms.getRequestContext().isSecureRequest());
  
          return (secure ? getSecureUrl() : getUrl());
      }
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 resourceName the resource name
  
  @return the server prefix for the given resource in this site
  
  @see #getSecureUrl()
  @see #getUrl()