解决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的主要内容,如果未能解决你的问题,请参考以下文章

_mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h':问题的解决 mysql安装pyth

解决:Server IPC version 9 cannot communicate with client version 4

解决maven web项目Cannot detect Web Project version. Please specify version of Web Project through...的错误

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

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

解决maven项目Cannot change version of project facet Dynamic web module to 3.0/3.1