将eclipse项目部署到tomcat根目录
tomca version: 7.x
eclipse Version: Kepler Service Release 2
使用eclipse开发web项目,会把项目部署到tomcat中。按正常方法部署后,项目的访问路径会加上项目名,比如http://localhost:8080/hello\_project/。
如果我们希望用http://localhost:8080/来直接访问,那么可以通过以下方法设置:
1、右键点击项目名—Properties—Tomcat—General
2、将Context name框中值修改为:/
还没有评论,来说两句吧...