String path=getServletContext().getRealPath("/");
System.out.println(path);
String url=request.getScheme()+"://";
url+=request.getHeader("host");
System.out.println(url);
if(request.getQueryString()!=null)
url+="?"+request.getQueryString();
String aa=request.getQueryString();
url+=request.getRequestURI();
jsp获取相对地址与url地址
最新推荐文章于 2018-09-10 09:43:45 发布