问题描述:linux下安装好eclipse oxygen,开发java动态web项目时,在工作空间配置server,但是在eclipse里面启动server后,eclipse显示启动正常,但访问localhost:8080,报404错误,如图:

The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
经过一番搜索和自己的实验终于找到了解决方法。
1、在Eclipse停止Tomcat Server,右键eclipse 项目下的server,点击stop

2、移除Server中部署的项目,右键eclipse 项目下的server,点击clean Tomcat Work Directory

3、右键eclipse 项目下的server,选择“clean”

4、右键eclipse 项目下的server,点击properties

5、点击Switch Location,选择配置的server

6、在eclipse新建的servers下可以看到配置的server了,双击。

7、选择第二个选项,默认是第一选项,如果三个选项都是灰色的,删除配置好的server,重新配置server按照以上步骤重新来一遍。

8、在eclipse中启动tomcat,看到了熟悉的界面,表示成功。
