Request请求的一些路径问题 getContextPath() getContextPath() String contextPath = request.getContextPath() 这里的request.getContextPath() 获取的是项目的虚拟路径 例如:访问路径为:http://localhost:8080/fhwm/web/html/welcome.html request.getContextPath()得到的就是/fhwm