public static String getUrlAsString ( final Class < ? extends Page > pageClass ) { final Url pageUrl = getPageUrl ( pageClass ) ; final Url url = getBaseUrl ( pageClass ) ; url . resolveRelative ( pageUrl ) ; final String contextPath = getContextPath ( ) ; return String . format ( "%s/%s" , contextPath , url ) ; }
Gets the url as string from the given WebPage class object .