1、Type Dynamic Web Module 3.0 requires Java 1.6 or newer 错误
解决方法:
在项目的pom.xml的<build></build>标签中加入:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
其中source和target中的值大于等于1.6就可以了。
2、Cannot upgrade/downgrade to Dynamic Web Module 2.3 facet 错误
解决方法:
将web.xml命名空间信息修改为
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>Archetype Created Web Application</display-name>
</web-app>
3、创建完后index.jsp报错
解决方法:在pom.xml中添加依赖包
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
</dependency>