导入项目tomcat版本不符解决方案

1.eclipse的workspace目录 ——》项目名 ——》.settings ——》org.eclipse.wst.common.project.facet.core.xml

.

<runtime/>改成自己的tomcat版本

<installed facet="jst.web" version=" "/> 改成自己的版本

 如何查看自己本来的version版本呢?

右键eclipse正常运行的项目 ——》Properties

 发现自己Dynamic Web Module版本是3.1,因此将version=“3.1”便好

2.eclipse的workspace目录 ——》项目名 ——》WebContent ——》WEB-INF ——》web.xml

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">

最后的3_1和3.1改为自己的Dynamic Web Module版本.

猜你喜欢

转载自blog.csdn.net/qq_36470686/article/details/83380026