public String getContextUrl ( HttpServletRequest request ) { StringBuffer url = request . getRequestURL ( ) ; String context = request . getContextPath ( ) ; String contextUrl = url . substring ( 0 , url . indexOf ( context ) + context . length ( ) ) ; return contextUrl ; }
Return the full URL of the context .