System.out.println(" Auth Type -> " + request.getAuthType());
System.out.println(" Content Type -> " + request.getContentType());
System.out.println(" Char Encod -> " + request.getCharacterEncoding());
System.out.println(" Context getContextPath -> " + request.getContextPath());
System.out.println(" Context getLocalAddr -> " + request.getLocalAddr());
System.out.println(" Context getLocalName -> " + request.getLocalName());
System.out.println(" Context getMethod -> " + request.getMethod());
System.out.println(" getPathInfo -> " + request.getPathInfo());
System.out.println(" getPathTranslated -> " + request.getPathTranslated());
System.out.println(" getProtocol -> " + request.getProtocol());
System.out.println(" getQueryString -> " + request.getQueryString());
System.out.println(" getRemoteAddr -> " + request.getRemoteAddr());
System.out.println(" getRemoteHost -> " + request.getRemoteHost());
System.out.println(" getRemoteUser -> " + request.getRemoteUser());
System.out.println(" getRequestURI -> " + request.getRequestURI());
System.out.println(" getRequestedSessionId -> " + request.getRequestedSessionId());
System.out.println(" getServerName -> " + request.getServerName());
System.out.println(" getScheme -> " + request.getScheme());
System.out.println(" getServletPath -> " + request.getServletPath());
System.out.println(" toString -> " + request.toString());
Enumeration paramNames = request.getParameterNames();
while(paramNames.hasMoreElements())
{
String headerName = (String)paramNames.nextElement();
System.out.println(">>" + "<TR><TD>" + headerName);
}
Enumeration headerNames = request.getHeaderNames();
while(headerNames.hasMoreElements())
{
String headerName = (String)headerNames.nextElement();
System.out.println(">>" + "<TR><TD>" + headerName);
}
Output:
INFO: Auth Type -> null
INFO: Content Type -> application/x-www-form-urlencoded
INFO: Char Encod -> null
INFO: Context getContextPath -> /JSPServlet
INFO: Context getLocalAddr -> 0:0:0:0:0:0:0:1
INFO: Context getLocalName -> 0:0:0:0:0:0:0:1
INFO: Context getMethod -> POST
INFO: getPathInfo -> null
INFO: getPathTranslated -> null
INFO: getProtocol -> HTTP/1.1
INFO: getQueryString -> null
INFO: getRemoteAddr -> 0:0:0:0:0:0:0:1
INFO: getRemoteHost -> 0:0:0:0:0:0:0:1
INFO: getRemoteUser -> null
INFO: getRequestURI -> /JSPServlet/HelloServlet
INFO: getRequestedSessionId -> ee087faae47c5700828ee4bf90c9
INFO: getServerName -> localhost
INFO: getScheme -> http
INFO: getServletPath -> /HelloServlet
INFO: toString -> org.apache.catalina.connector.RequestFacade@caf3796
INFO: >><TR><TD>name1
INFO: >><TR><TD>name2
INFO: >><TR><TD>host
INFO: >><TR><TD>user-agent
INFO: >><TR><TD>accept
INFO: >><TR><TD>accept-language
INFO: >><TR><TD>accept-encoding
INFO: >><TR><TD>dnt
INFO: >><TR><TD>connection
INFO: >><TR><TD>referer
INFO: >><TR><TD>cookie
INFO: >><TR><TD>content-type
INFO: >><TR><TD>content-length
No comments:
Post a Comment