项目名称

request请求地址

1、String contextPath = httpServletRequest.getServletContext().getContextPath(); /项目名称 2、String contextPath2 = httpServletRequest.getContextPath(); /项目名称 3、String requestURI = http...

idea下面修改项目的访问路径

新建好了项目发现项目只能以localhost:8080这样的访问路径访问到主页,也就是index.jsp 那么之前我用eclipse新建的项目都是localhost:8080/xxx(项目名称)来访问。当然是可以设置tomcat来使他去除项目名称,那么IntelliJ idea应该也是一样,但是IntelliJ idea的tomcat全部都是独立的,也就是...