码迷,mamicode.com
首页 > 其他好文 > 详细

request方法

时间:2017-09-22 19:12:39      阅读:137      评论:0      收藏:0      [点我收藏+]

标签:url   arp   obj   request方法   add   context   use   tco   object   

Object o = null;	
o = request.getLocalAddr();System.out.println(o);	127.0.0.1
o = request.getLocalName();System.out.println(o);	vinci.ie.sogou.com
o = request.getLocalPort();System.out.println(o);	8080
o = request.getRemoteAddr();System.out.println(o);	127.0.0.1
o = request.getRemotePort();System.out.println(o);	65160
o = request.getRemoteHost();System.out.println(o);	127.0.0.1
o = request.getRemoteUser();System.out.println(o);	null
o = request.getRequestURI();System.out.println(o);	/su-www/getUserinfo.json
o = request.getRequestURL();System.out.println(o);	http://localhost:8080/su-www/getUserinfo.json
o = request.getServerName();System.out.println(o);	localhost
o = request.getServerPort();System.out.println(o);	8080
o = request.getServletPath();System.out.println(o);	/getUserinfo.json
o = request.getContextPath();System.out.println(o);	/su-www
o = request.getScheme();System.out.println(o);		http
o = request.getQueryString();System.out.println(o);	null

  

request方法

标签:url   arp   obj   request方法   add   context   use   tco   object   

原文地址:http://www.cnblogs.com/caer/p/7576165.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!