Java代码获取http请求的整个URL

Posted on Jun 20, 2016
String url=request.getScheme()+"://"; 
url+=request.getHeader("host"); 
url+=request.getRequestURI(); 
if(request.getQueryString()!=null) 
url+="?"+request.getQueryString();