Eclipse中启动tomcat后,无法访问localhost:8080(HTTP Status 404)

版权声明:本文为博主原创文章,未经博主允许不得转载。如有问题,欢迎指正。 https://blog.csdn.net/weixin_43197380/article/details/89219682

问题:
       在tomcat安装目录/bin下双击startup.bat启动tomcat服务器,正常访问localhost:8080。但在Eclipse中启动tomcat,不能访问localhost:8080,提示404错误,但是可以访问项目页面。

原因:
       在eclipse中启动的tomcat并部署项目时,eclipse只是调用了tomcat核心的组件内置到eclipse中,而不是真正启动tomcat。

解决方案:
       双击Eclipse中Servers里面的tomcat,将Deploy Path的默认值“wtpwebapps”,改为tomcat里面的webapps路径,然后重新启动即可。
在这里插入图片描述
注:若Browse为无法更改状态,要将添加的工程项目移除。
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_43197380/article/details/89219682