Prentice Hall and Sun Microsystems. Personal use only; do not redistribute.
4.2 Printing All Headers
97
Listing 4.1 ShowRequestHeaders.java (continued)
"\n" +
\n"\n" + "Header Name Header Value"); Enumeration headerNames = request.getHeaderNames();while(headerNames.hasMoreElements()) {String headerName = (String)headerNames.nextElement();out.println("" + headerName); out.println("" + request.getHeader(headerName)); }out.println("