request.getRequestURL()和request.getRequestURI()

request.getRequestURI() /jqueryWeb/resources/request.jsp
request.getRequestURL() http://localhost:8080/jqueryWeb/resources/request.jsp
request.getContextPath()/jqueryWeb
request.getServletPath()/resources/request.jsp


注: resources为WebContext下的目录名
  jqueryWeb 为工程名

你可能感兴趣的:(java,request)