假如一个请求为 http://localhost:8080/pro/test
request.getServerName() 能得到其中的 localhost
request.getServerPort() 能得到其中的 8080
request.getRequestURL() 能得到其中的 /pro/test (就是请求的项目名+请求路径)
request.getServletContext().getContextPath() 能得到其中的 /pro (也就是项目名)
request.getServletPath() 能得到其中的 /test (请求路径)