码迷,mamicode.com
首页 > 编程语言 > 详细

java request获取相关路径

时间:2017-11-28 19:59:50      阅读:151      评论:0      收藏:0      [点我收藏+]

标签:oca   info   lis   let   pat   san   context   div   isp   

Request URL: http://localhost:8080/sanjuSCM/scmTruck/list.do?truckno=%E6%B2%AAF00000&companyid_Display=&companyid=

String u = request.getRequestURI();   /sanjuSCM/scmTruck/list.do

String u2 = request.getContextPath(); /sanjuSCM

String u3 = request.getPathInfo();  null
String u4 = request.getServletPath();  /scmTruck/list.do
String u5 = request.getRequestURL().toString();  http://localhost:8080/sanjuSCM/scmTruck/list.do
String u6 = request.getRequestURL().toString()+"?"+(StringUtils.isBlank(request.getQueryString())?"":request.getQueryString());  http://localhost:8080/sanjuSCM/scmTruck/list.do?truckno=%E6%B2%AAF00000&companyid_Display=&companyid=

 

java request获取相关路径

标签:oca   info   lis   let   pat   san   context   div   isp   

原文地址:http://www.cnblogs.com/cghhnty/p/7911369.html

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