解决Cannot change version of project facet Dynamic web module to 3.0

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决Cannot change version of project facet Dynamic web module to 3.0相关的知识,希望对你有一定的参考价值。

在Project Facets里面修改Dynamic web module为3.0的时候就会出现Cannot change version of project facet Dynamic web module to 3.0

 

解决问题步骤如下: 

1.修改web.xml为

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
    id="schedule-console" version="3.0">
    <display-name>Archetype Created Web Application</display-name>
</web-app>

注意web-app_3_0和version=3.0

 

2.打开项目.settings目录下的org.eclipse.wst.common.project.facet.core.xml

  <installed facet="java" version="1.8"/> <!-- java版本1.8 -->
  <installed facet="jst.web" version="3.0"/> <!-- servlet3.0 -->
  <installed facet="wst.jsdt.web" version="1.0"/>

 

 

3.maven update

技术分享图片

 

以上是关于解决Cannot change version of project facet Dynamic web module to 3.0的主要内容,如果未能解决你的问题,请参考以下文章

Cannot change version of project facet Dynamic Web Module to 2.4问题解决

Cannot change version of project facet Dynamic Web Module to 2.4问题解决

Cannot change version of project facet Dynamic Web Module to 2.4问题解决

解决Cannot change version of project facet Dynamic web module to 2.5

解决Cannot change version of project facet Dynamic web module to 2.5

解决Cannot change version of project facet Dynamic web module to 2.5