获取请求的url

http://wjt276.iteye.com/blog/561346

http://localhost:7001/myservlet/somepath/test?someparam=somevalue     request.getPathInfo():返回/somepath/test    
request.getRequestURL():返回http://localhost:7001/myservlet/somepath/test    
request.getRequestURI():返回/myservlet/somepath/test    
request.getServletPath():返回/myservlet    
request.getQueryString():返回someparam=somevalue
request().getHeader("Referer");

你可能感兴趣的:(Blog)