我想这就是您要寻找的..
String str=request.getRequestURL()+"?";Enumeration<String> paramNames = request.getParameterNames();while (paramNames.hasMoreElements()){ String paramName = paramNames.nextElement(); String[] paramValues = request.getParameterValues(paramName); for (int i = 0; i < paramValues.length; i++) { String paramValue = paramValues[i]; str=str + paramName + "=" + paramValue; } str=str+"&";}System.out.println(str.substring(0,str.length()-1)); //remove the last character from String


