public static String getRequestUrl ( final Page current ) { if ( current != null ) { return current . getLocation ( ) . toString ( ) ; } else { final HttpServletRequest httpRequest = ( ( ServletRequestAttributes ) RequestContextHolder . currentRequestAttributes ( ) ) . getRequest ( ) ; return httpRequest . getRequestURL ( ) . toString ( ) ; } }
Gets the request url .