-
慕的地10843
现在给你解答String getFullURL(HttpRequest request) {StringBuffer url = request.getRequestURL();if (request.getQueryString() != null) {url.append(’?’);url.append(request.getQueryString());}return url.toString();}
-
幕布斯7119047
String uri=request.getRequestURI();String path=uri.substring(uri.lastIndexOf("/"),uri.lastIndexOf("."));如果你的web.xml 中请求路径是" *.do ",那么在servlet中可以根据这个判断应该能获取到比如:if(path=“/list”){}
-
PIPIONE
1String header_referer = request.getHeader("Referer");通过上述的Java代码即可获取到请求的引用页面地址