public String removeSiteRoot(String rootPath) {

        String siteRoot = getAdjustedSiteRoot(getSiteRoot(), rootPath);
        if ((siteRoot != null)
            && (siteRoot.equals(getSiteRoot()))
            && rootPath.startsWith(siteRoot)
            && ((rootPath.length() == siteRoot.length()) || (rootPath.charAt(siteRoot.length()) == '/'))) {
            rootPath = rootPath.substring(siteRoot.length());
        }
        return rootPath;
    }
public String removeSiteRoot ( String rootPath ) { String siteRoot = getAdjustedSiteRoot ( getSiteRoot ( ) , rootPath ) ; if ( ( siteRoot != null ) && ( siteRoot . equals ( getSiteRoot ( ) ) ) && rootPath . startsWith ( siteRoot ) && ( ( rootPath . length ( ) == siteRoot . length ( ) ) || ( rootPath . charAt ( siteRoot . length ( ) ) == '/' ) ) ) { rootPath = rootPath . substring ( siteRoot . length ( ) ) ; } return rootPath ; }
Removes the current site root prefix from the given root path,
that is adjusts the resource name for the current site root.<p>

If the resource name does not start with the current site root,
it is left untouched.<p>

@param rootPath the resource name

@return the resource name adjusted for the current site root

@see #addSiteRoot(String)