JSP request获得完整路径
方法一:
request.getHeader("Referer") : 获得当前的URL详细地址 如:http://www.sina.com:80/a.php?sa=123
方法二:
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
out.println(basePath);
%>
获当前当的URL地址 如:http://www.sina.com/WEB-ROOT/