java路径总结

假设项目根路径为/home/project/bbb,当前URL为http://www.aaa.com/bbb/ccc/ddd.html

request.getRequestURI()=/bbb/ccc/ddd.html
request.getRequestURL()=http://www.aaa.com/bbb/ccc/ddd.html

request.getContextPath=bbb
request.getServletContext().getContextPath=bbb

你可能感兴趣的:(java路径总结)