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 为工程名
request.getQueryString()
http://localhost:8080/jqueryWeb/resources/request.jsp?a=123&b=dfdf
得到a=123&b=dfdf
跳转:
getServletContext.getRequsetDispather("/index.html").forword(requset.response);
response.sendRedirect("/index.html");