Last active
April 10, 2020 20:13
-
-
Save alvarow/cc2852acc7439141be71 to your computer and use it in GitHub Desktop.
Print HTTP request headers in JSP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ page import="java.util.*" %> | |
<html> | |
<head> | |
<title>Http Request Headers Example in JSP</title> | |
</head> | |
<body> | |
<h2>HTTP Request Headers Received</h2> | |
<table> | |
<% Enumeration enumeration = request.getHeaderNames(); while (enumeration.hasMoreElements()) { String name=(String) enumeration.nextElement(); String value = request.getHeader(name); %> | |
<tr> | |
<td> | |
<%=n ame %> | |
</td> | |
<td> | |
<%=v alue %> | |
</td> | |
</tr> | |
<% } %> | |
</table> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment