Created
June 13, 2015 21:15
-
-
Save larrybolt/cf164f35fe045ecc790f to your computer and use it in GitHub Desktop.
Java Server Page Fragment with some debug info
This file contains hidden or 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.Enumeration" %> | |
<div class="debug"> | |
<%= request.getMethod() %> | |
<%= request.getRequestURI() %> | |
</div> | |
<div class="debug"> | |
request.Attributes: | |
<ul> | |
<% for (Enumeration<String> e = request.getAttributeNames(); e.hasMoreElements();){ | |
String El = e.nextElement(); | |
%> | |
<li> | |
<strong><%= El %></strong> = | |
<%= | |
request.getAttribute(El).getClass().equals(String.class) ? | |
request.getAttribute(El) : | |
request.getAttribute(El).getClass() %> | |
</li> | |
<% } %> | |
</ul> | |
</div> | |
<div class="debug"> | |
request.Parameters | |
<ul> | |
<% | |
for (Enumeration<String> e = request.getParameterNames(); e.hasMoreElements();){ | |
String El = e.nextElement(); | |
%> | |
<li> | |
<strong><%= El %></strong> = | |
<%= request.getParameter(El) %> | |
</li> | |
<% } %> | |
</ul> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment