<%@ page import="javax.servlet.http.HttpUtils,java.util.Enumeration" %>

WebApp JSP Snoop page

Request information

Requested URL: <%= HttpUtils.getRequestURL(request) %>
Request method: <%= request.getMethod() %>
Request URI: <%= request.getRequestURI() %>
Request protocol: <%= request.getProtocol() %>
Servlet path: <%= request.getServletPath() %>
Path info: <%= request.getPathInfo() %>
Path translated: <%= request.getPathTranslated() %>
Query string: <% if(request.getQueryString()!=null) out.write(request.getQueryString().replaceAll("<", "<").replaceAll(">",">")); %>
Content length: <%= request.getContentLength() %>
Content type: <%= request.getContentType() %>
Server name: <%= request.getServerName() %>
Server port: <%= request.getServerPort() %>
Remote user: <%= request.getRemoteUser() %>
Remote address: <%= request.getRemoteAddr() %>
Remote host: <%= request.getRemoteHost() %>
Authorization scheme: <%= request.getAuthType() %>
<% Enumeration e = request.getHeaderNames(); if(e != null && e.hasMoreElements()) { %>

Request headers

<% while(e.hasMoreElements()) { String k = (String) e.nextElement(); %> <% } %>
Header: Value:
<%= k %> <%= request.getHeader(k) %>
<% } %> <% e = request.getParameterNames(); if(e != null && e.hasMoreElements()) { %>

Request parameters

<% while(e.hasMoreElements()) { String k = (String) e.nextElement(); String val = request.getParameter(k); String vals[] = request.getParameterValues(k); %> <% } %>
Parameter: Value: Multiple values:
<%= k.replaceAll("<", "<").replaceAll(">",">") %> <%= val.replaceAll("<", "<").replaceAll(">",">") %> <% for(int i = 0; i < vals.length; i++) { if(i > 0) out.print("
"); out.print(vals[i].replaceAll("<", "<").replaceAll(">",">")); } %>
<% } %> <% e = request.getAttributeNames(); if(e != null && e.hasMoreElements()) { %>

Request Attributes

<% while(e.hasMoreElements()) { String k = (String) e.nextElement(); Object val = request.getAttribute(k); %> <% } %>
Attribute: Value:
<%= k.replaceAll("<", "<").replaceAll(">",">") %> <%= val.toString().replaceAll("<", "<").replaceAll(">",">") %>
<% } %> <% e = getServletConfig().getInitParameterNames(); if(e != null && e.hasMoreElements()) { %>

Init parameters

<% while(e.hasMoreElements()) { String k = (String) e.nextElement(); String val = getServletConfig().getInitParameter(k); %> <% } %>
Parameter: Value:
<%= k %> <%= val %>
<% } %>