Skip to content

Instantly share code, notes, and snippets.

@alvarow alvarow/print-headers.jsp
Last active Apr 26, 2018

What would you like to do?
Print HTTP request headers in JSP
<%@ page import="java.util.*" %>
<title>Http Request Headers Example in JSP</title>
<h2>HTTP Request Headers Received</h2>
<% Enumeration enumeration = request.getHeaderNames(); while (enumeration.hasMoreElements()) { String name=(String) enumeration.nextElement(); String value = request.getHeader(name); %>
<%=n ame %>
<%=v alue %>
<% } %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.