question: public static String baseUriOf ( final HttpServletRequest request ) { final StringBuffer requestUrl = request . getRequestURL ( ) ; return requestUrl != null ? requestUrl . substring ( 0 , requestUrl . indexOf ( request . getServletPath ( ) ) ) : "" ; }
target:  Returns the baseUri of the request: http://www.example.com:8080/example