public String getRequestInfo ( ) { Map info = new TreeMap ( ) ; HttpServletRequest req = ( HttpServletRequest ) pageContext . getRequest ( ) ; info . put ( "authType" , nullToString ( req . getAuthType ( ) ) ) ; info . put ( "characterEncoding" , nullToString ( req . getCharacterEncoding ( ) ) ) ; info . put ( "contentLength" , Integer . toString ( req . getContentLength ( ) ) ) ; info . put ( "contentType" , nullToString ( req . getContentType ( ) ) ) ; info . put ( "contextPath" , nullToString ( req . getContextPath ( ) ) ) ; info . put ( "pathInfo" , nullToString ( req . getPathInfo ( ) ) ) ; info . put ( "protocol" , nullToString ( req . getProtocol ( ) ) ) ; info . put ( "queryString" , nullToString ( req . getQueryString ( ) ) ) ; info . put ( "remoteAddr" , nullToString ( req . getRemoteAddr ( ) ) ) ; info . put ( "remoteHost" , nullToString ( req . getRemoteHost ( ) ) ) ; info . put ( "remoteUser" , nullToString ( req . getRemoteUser ( ) ) ) ; info . put ( "requestURI" , nullToString ( req . getRequestURI ( ) ) ) ; info . put ( "scheme" , nullToString ( req . getScheme ( ) ) ) ; info . put ( "serverName" , nullToString ( req . getServerName ( ) ) ) ; info . put ( "serverPort" , Integer . toString ( req . getServerPort ( ) ) ) ; info . put ( "servletPath" , nullToString ( req . getServletPath ( ) ) ) ; return toHTMLTable ( "request properties" , info ) ; }
Returns a String with all basic request information in an HTML table .