- Dynamic Web Module 3.0 requires Java 1.6 or newer.
Solution:
- In eclipse, find facets template file by name : org.eclipse.wst.common.project.facet.core.xml
- Edit the file and change the dynamic web module version in this line to 3.0 - <installed facet="jst.web" version="2.5"/>
- update web.xml to 3.0 dynamic web module as well. e.g
- in IDE(e.g eclipse), right click <project name> -> maven -> update projects.
- Done!
<?xml version="1.0" encoding="UTF-8"?> <faceted-project> <fixed facet="wst.jsdt.web"/> <installed facet="jst.web" version="
3.0
"/> <installed facet="wst.jsdt.web" version="1.0"/> <installed facet="java" version="
1.8
"/> </faceted-project>
<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>Servlet 3.0 Web Application</display-name>
</web-app>
NOTE: if there is still error
Q: Dynamic Web Module 3.0 requires Java 1.6 or newer
A: add following in pom or compilation setting
<build>
<directory>${basedir}/target</directory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<showWarnings>true</showWarnings>
</configuration>
</plugin>
</plugins>
</build>
Muito bom...voce me ajudou muito aqui..valeu.
ReplyDeletegood...you help a lot here.thanks
ReplyDeletegood...you helped me a lot..thanks
Delete