Enumeration headernames=request.getHeaderNames();
while(headernames.hasMoreElements()){
String headername=headernames.nextElement();
out.println(headername+"-->"+request.getHeader(headername)+"
");}
out.println("
");
****************************************************************************************【来自我另一博文】