标签:
public static void test(HttpServletRequest request, HttpServletResponse response) throws IOException { request.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8"); response.setContentType("text/plain;charset=utf-8"); PrintWriter out = response.getWriter(); out.println("AuthType=" + request.getAuthType()); out.println("CharacterEncoding=" + request.getCharacterEncoding()); out.println("ContentLength=" + request.getContentLength()); out.println("ContentType=" + request.getContentType()); out.println("ContextPath=" + request.getContextPath()); out.println("LocalAddr=" + request.getLocalAddr()); out.println("LocalName=" + request.getLocalName()); out.println("LocalPort=" + request.getLocalPort()); out.println("Method=" + request.getMethod()); out.println("PathInfo=" + request.getPathInfo()); out.println("PathTranslated=" + request.getPathTranslated()); out.println("Protocol=" + request.getProtocol()); out.println("QueryString=" + request.getQueryString()); out.println("RemoteAddr=" + request.getRemoteAddr()); out.println("RemoteHost=" + request.getRemoteHost()); out.println("RemotePort=" + request.getRemotePort()); out.println("RemoteUser=" + request.getRemoteUser()); out.println("RequestedSessionId=" + request.getRequestedSessionId()); out.println("RequestURI=" + request.getRequestURI()); out.println("Scheme=" + request.getScheme()); out.println("ServerName=" + request.getServerName()); out.println("ServerPort=" + request.getServerPort()); out.println("ServletPath=" + request.getServletPath()); out.println("Local=" + request.getLocale()); out.println("RequestedURL=" + request.getRequestURL()); out.flush(); out.close(); System.out.println("AuthType=" + request.getAuthType()); System.out.println("CharacterEncoding=" + request.getCharacterEncoding()); System.out.println("ContentLength=" + request.getContentLength()); System.out.println("ContentType=" + request.getContentType()); System.out.println("ContextPath=" + request.getContextPath()); System.out.println("LocalAddr=" + request.getLocalAddr()); System.out.println("LocalName=" + request.getLocalName()); System.out.println("LocalPort=" + request.getLocalPort()); System.out.println("Method=" + request.getMethod()); System.out.println("PathInfo=" + request.getPathInfo()); System.out.println("PathTranslated=" + request.getPathTranslated()); System.out.println("Protocol=" + request.getProtocol()); System.out.println("QueryString=" + request.getQueryString()); System.out.println("RemoteAddr=" + request.getRemoteAddr()); System.out.println("RemoteHost=" + request.getRemoteHost()); System.out.println("RemotePort=" + request.getRemotePort()); System.out.println("RemoteUser=" + request.getRemoteUser()); System.out.println("RequestedSessionId=" + request.getRequestedSessionId()); System.out.println("RequestURI=" + request.getRequestURI()); System.out.println("Scheme=" + request.getScheme()); System.out.println("ServerName=" + request.getServerName()); System.out.println("ServerPort=" + request.getServerPort()); System.out.println("ServletPath=" + request.getServletPath()); System.out.println("Local=" + request.getLocale()); System.out.println("RequestedURL=" + request.getRequestURL()); }
标签:
原文地址:http://www.cnblogs.com/jiucheng/p/4534344.html