解决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

 

posted @ 2017-12-09 14:47  CComma  阅读(341)  评论(0编辑  收藏  举报