request.getHeader(""),简单的说就是获取请求的头部信息,根据http协议,它能获取到用户访问链接的信息. /** * Returns the value of the specified request header * as a <code>String</code>. If the request did not include a header * of the specified name, this method returns &
协议:request.getProtocol() 输出:HTTP/1.1 服务器信息 getServletConfig().getServletContext().getServerInfo() 输出:JavaServer Web Dev Kit/1.0 EA (JSP 1.0; Servlet 2.1; Java 1.2; Windows NT 5.0 x86; java.vendor=Sun Microsystems Inc.) 客户端IP: request.getRemoteAddr()