Return to Snippet

Revision: 44213
at April 8, 2011 00:41 by ejboy


Updated Code
<%@ page import="java.util.Enumeration"%>
<%@ page import="java.util.Collections"%>

<html>
<title>Request details</title>
<body>
	
	<pre>
<%
	out.println(request.getRequestURL() + "?" + request.getQueryString());
	for(String h : Collections.list((Enumeration<String>)request.getHeaderNames())) {
		for(String v : Collections.list((Enumeration<String>)request.getHeaders(h))) {
			out.println(h+": "+v);
		}
	}
	
%>
</pre>
</body>
</html>

Revision: 44212
at April 8, 2011 00:39 by ejboy


Initial Code
<%@ page import="java.util.Enumeration"%>
<%@ page import="java.util.Collections"%>
<%@ page import="java.util.ArrayList"%>
<html>
<title>Request details</title>
<body>
	
	<pre>
<%
	out.println(request.getRequestURL() + "?" + request.getQueryString());
	for(String h : Collections.list((Enumeration<String>)request.getHeaderNames())) {
		for(String v : Collections.list((Enumeration<String>)request.getHeaders(h))) {
			out.println(h+": "+v);
		}
	}
	
%>
</pre>
</body>
</html>

Initial URL

                                

Initial Description

                                

Initial Title
Print request details in JSP

Initial Tags
java

Initial Language
HTML