博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
jsp获得访问者来源和request.getHeader方法的内容
阅读量:5462 次
发布时间:2019-06-15

本文共 2084 字,大约阅读时间需要 6 分钟。

jsp获得访问者来源和request.getHeader方法的内容   

System.out.println("Protocol: " + request.getProtocol());

    System.out.println("Scheme: " + request.getScheme());
    System.out.println("Server Name: " + request.getServerName() );
    System.out.println("Server Port: " + request.getServerPort());
    System.out.println("Protocol: " + request.getProtocol());
    System.out.println("Server Info: " + getServletConfig().getServletContext().getServerInfo());
    System.out.println("Remote Addr: " + request.getRemoteAddr());
    System.out.println("Remote Host: " + request.getRemoteHost());
    System.out.println("Character Encoding: " + request.getCharacterEncoding());
    System.out.println("Content Length: " + request.getContentLength());
    System.out.println("Content Type: "+ request.getContentType());
    System.out.println("Auth Type: " + request.getAuthType());
    System.out.println("HTTP Method: " + request.getMethod());
    System.out.println("Path Info: " + request.getPathInfo());
    System.out.println("Path Trans: " + request.getPathTranslated());
    System.out.println("Query String: " + request.getQueryString());
    System.out.println("Remote User: " + request.getRemoteUser());
    System.out.println("Session Id: " + request.getRequestedSessionId());
    System.out.println("Request URI: " + request.getRequestURI());
    System.out.println("Servlet Path: " + request.getServletPath());
    System.out.println("Accept: " + request.getHeader("Accept"));
    System.out.println("Host: " + request.getHeader("Host"));
    System.out.println("Referer : " + request.getHeader("Referer"));
    System.out.println("Accept-Language : " + request.getHeader("Accept-Language"));
    System.out.println("Accept-Encoding : " + request.getHeader("Accept-Encoding"));
    System.out.println("User-Agent : " + request.getHeader("User-Agent"));
    System.out.println("Connection : " + request.getHeader("Connection"));
    System.out.println("Cookie : " + request.getHeader("Cookie"));
    System.out.println("Created : " + session.getCreationTime());
    System.out.println("LastAccessed : " + session.getLastAccessedTime());

转载于:https://www.cnblogs.com/anuoruibo/archive/2012/12/05/2803469.html

你可能感兴趣的文章
MySQL5.6复制技术(1)-原理详解
查看>>
Spring Security OAuth2 SSO
查看>>
linux 安装程序
查看>>
幸福框架:(Ajax)七层领域驱动架构
查看>>
基于Eclipse的Android开发环境搭建
查看>>
2014-5-29 总结
查看>>
Make Object Properties Private
查看>>
Corosync fence盘替换
查看>>
hadoop完全分布式文件系统集群搭建
查看>>
内置函数
查看>>
登录界面 动画背景效果
查看>>
关于hession 随笔
查看>>
青柠网络验证
查看>>
kali系统网站部署笔记
查看>>
BZOJ2300 [HAOI2011] 防线修建
查看>>
B.xml
查看>>
NOIP知识点汇总
查看>>
Ant Design 常用命令汇总
查看>>
Python3 学习第十三弹: 模块学习五之pickle与json
查看>>
GameFreamWork框架----事件系统的应用
查看>>