用 maven 命令启动项目和直接用tomcat 启动项目的区别

用 maven 命令启动项目:

右键项目——>run as maven build,在 Goals 里面输入:clean tomcat7:run 

这样启动项目后,直接在浏览器中输入:http://localhost:8080,就可以直接定位到 index.jsp 页面中(web.xml 中配置了),而不需要在 8080 后面带上项目名,而用 tomcat 启动项目的时候,就需要在 8080 后面带上项目的名才能访问 index.jsp 页面

猜你喜欢

转载自blog.csdn.net/maxiao1204/article/details/79884567
今日推荐