public static final String getFullRequestUri ( HttpServletRequest request , boolean includeQueryString ) { StringBuilder uri = getBaseRequestUrl ( request , false ) . append ( request . getRequestURI ( ) ) ; if ( includeQueryString ) { String queryStr = request . getQueryString ( ) ; if ( StringUtils . isNotEmpty ( queryStr ) ) { uri . append ( ' ' ) . append ( queryStr ) ; } } return uri . toString ( ) ; }
Returns the full request URI including scheme server name port number and server path . The query string is optional .