HttpServletRequest 常用返回值类型
2015-06-01 18:32
633 查看
请求地址:http://localhost:8888/phoenix/attach/add
System.out.println("1 "+req.getLocalAddr());
System.out.println("2 "+req.getLocalName());
System.out.println("3 "+req.getLocalPort());
System.out.println("4 "+req.getPathInfo());
System.out.println("5 "+req.getPathTranslated());
System.out.println("6 "+req.getServerName());
System.out.println("7 "+req.getServerPort());
System.out.println("8 "+req.getServletPath());
System.out.println("9 "+req.getRequestURL());
输出:
1 0:0:0:0:0:0:0:1
2 [0:0:0:0:0:0:0:1]
3 8888
4 null
5 null
6 localhost
7 8888
8 /attach/add
9 http://localhost:8888/phoenix/attach/add
System.out.println("1 "+req.getLocalAddr());
System.out.println("2 "+req.getLocalName());
System.out.println("3 "+req.getLocalPort());
System.out.println("4 "+req.getPathInfo());
System.out.println("5 "+req.getPathTranslated());
System.out.println("6 "+req.getServerName());
System.out.println("7 "+req.getServerPort());
System.out.println("8 "+req.getServletPath());
System.out.println("9 "+req.getRequestURL());
输出:
1 0:0:0:0:0:0:0:1
2 [0:0:0:0:0:0:0:1]
3 8888
4 null
5 null
6 localhost
7 8888
8 /attach/add
9 http://localhost:8888/phoenix/attach/add
相关文章推荐
- AsyncTask实现ListView中异步加载网络图片
- C++网络编程概述(精)
- PHP的cURL库:抓取网页,POST数据及其他,HTTP认证 抓取数据
- 网络分析工具
- 基于HTTP 协议认证介绍与实现
- android有关网络连接的方法
- Google网络框架Volley的使用,Cache-Control=no-cache时强制缓存的处理
- Go和HTTPS
- 15岁少年建百人淫秽QQ群
- 网络编程释疑之:单台服务器上的并发TCP连接数可以有多少
- httpd简介以及httpd2.2简介
- NLB网络负载均衡
- 从客户端中检测到有潜在危险的Request.Form值的详细解决方案 本文来自:.Net学习网 http://www.lmwlove.com/ac/ID530
- Linux常用的网络命令
- 揭秘Google数据中心网络B4(李博杰)
- libgsc(Game Server Communication Library)(五)
- Linux TCP优化
- 网络异常 检查【此篇文章推荐大家看】
- 三大WEB服务器对比分析(apache ,lighttpd,nginx)
- Rayeager PX2测试tcp与PC机通信的测试程序分享