`

[原]getHttpHeader

阅读更多
《JSP完全学习手册》学习心得:getHttpHeader

getHttpHeader.jsp:
<%@page contentType="text/html;charset=GB2312" isErrorPage="true"%>
<%@page import="java.util.Enumeration" %>
<%
out.println(exception);
Enumeration headers = request.getHeaderNames();
while(headers.hasMoreElements()){
    String headerName = (String)headers.nextElement();
    String header = request.getHeader(headerName);
    out.println(headerName + " = ");
    out.println(header);
    out.println("<br />");
}
%>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics