eclipse出现 the selection cannot be run on any server 解决办法

有一次我导入了一个tomcat是9.0版本的文件(我的eclipse用的是8.5版本的),改了jar包后还是发现会出现

the selection cannot be run on any server,

后来我就找到我的eclipse:

D:eclipseworkspace-jee项目名称.settingsorg.eclipse.wst.common.project.facet.core.xml这个配置文件,把<runtime name="Apache Tomcat v9.0" />改为8.5就可以用了。
如果还出现了

Server Tomcat v9.0 Server at localhost failed to start.

那就把<installed facet="jst.web" version="2.5" />的version改为跟你的eclipse版本一致,假如版本是

3.1的那就改为3.1


原文链接:https://blog.csdn.net/weixin_42019223/article/details/80770181

原文地址:https://www.cnblogs.com/022414ls/p/13304422.html