|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
bb.servlet.RequestEcho
public class RequestEcho
This servlet echoes back information about the request that was sent to it. This is useful in debugging.
This class is multithread safe: it is immutable (both its immediate state, as well as the deep state of its fields).
doPost
,
doGet
,
Serialized FormField Summary | |
---|---|
private static long |
serialVersionUID
|
Constructor Summary | |
---|---|
RequestEcho()
|
Method Summary | |
---|---|
void |
doGet(HttpServletRequest request,
HttpServletResponse response)
This method simply calls doPost . |
void |
doPost(HttpServletRequest request,
HttpServletResponse response)
This method echoes back information about the request's metadata, headers, URL info, parameters, and content. |
protected void |
printContentInfo(HttpServletRequest request,
PrintWriter out)
Prints to out information about the request's content. |
protected void |
printHeaders(HttpServletRequest request,
PrintWriter out)
Prints to out any name/value header pairs in the request. |
protected void |
printMetadata(HttpServletRequest request,
PrintWriter out)
Prints to out metadata about the request. |
protected void |
printNetworkInfo(HttpServletRequest request,
PrintWriter out)
Prints to out the network information (local and remote) involved in the request. |
protected void |
printParameters(HttpServletRequest request,
PrintWriter out)
Prints to out any name/value parameter pairs in the request. |
protected void |
printUrlInfo(HttpServletRequest request,
PrintWriter out)
Prints to out information about the URL used by the request. |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
Constructor Detail |
---|
public RequestEcho()
Method Detail |
---|
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
doPost
.
doGet
in class HttpServlet
ServletException
IOException
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
doPost
in class HttpServlet
ServletException
IOException
protected void printNetworkInfo(HttpServletRequest request, PrintWriter out)
protected void printMetadata(HttpServletRequest request, PrintWriter out)
protected void printUrlInfo(HttpServletRequest request, PrintWriter out)
protected void printHeaders(HttpServletRequest request, PrintWriter out)
protected void printParameters(HttpServletRequest request, PrintWriter out)
protected void printContentInfo(HttpServletRequest request, PrintWriter out)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |