public class HttpEchoServlet
extends javax.servlet.http.HttpServlet
HttpServlet to echo the HttpServletRequest with headers and payload as HTML output in the
HttpServletResponse. This is very helpful especially if your application is behind a complex infrastructure
with reverse-proxies, etc.
@Bean
public ServletRegistrationBean echoServletRegistration() {
HttpEchoServlet echoServlet = new HttpEchoServlet();
ServletRegistrationBean registration = new ServletRegistrationBean(echoServlet);
registration.addUrlMappings("/debug/echo/*");
return registration;
}
| Modifier and Type | Field and Description |
|---|---|
private static String |
COOKIE_SECURED |
private static String |
SECURED |
private static long |
serialVersionUID |
| Constructor and Description |
|---|
HttpEchoServlet()
Der Konstruktor.
|
| Modifier and Type | Method and Description |
|---|---|
private String |
getSecuredValue(String originalHeaderName,
String value) |
private void |
printHeaders(javax.servlet.http.HttpServletRequest request,
PrintWriter out) |
protected void |
service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, serviceprivate static final long serialVersionUID
private static final String SECURED
private static final String COOKIE_SECURED
protected void service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
service in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionprivate void printHeaders(javax.servlet.http.HttpServletRequest request,
PrintWriter out)
Copyright © 2014–2019 devon4j-Team. All rights reserved.