java获取URL参数(get方式,并且你不知道他末尾有什么参数名)
String url=request.getScheme()+"://"; url+=request.getHeader("host"); url+=request.getRequestURI(); if(request.getQueryString()!=null) { url+="?"+request.getQueryString(); System. out.println(url); }
String url=request.getScheme()+"://"; url+=request.getHeader("host"); url+=request.getRequestURI(); if(request.getQueryString()!=null) { url+="?"+request.getQueryString(); System. out.println(url); }