INTRODUCTION
We may get this error on any of the below cases.
- Creating a new Dynamic Web Project
 - New Maven Maven Project
 - Importing existing maven project.
 
Following are the different solution for this issue.
SOLUTION - 1
- Select your project
 - Right click and go to Properties->Project Facets->Change the version 3.0 for Dynamic Web Module & also select Java version higher than JDK 6.
 - Apply & OK
 
SOLUTION - 2
If it is a maven project, just add the below to your pom.xml
<build> 
  <plugins> 
      <plugin> 
     <artifactId>maven-compiler-plugin</artifactId> 
     <configuration> 
 <source>1.8</source> 
 <target>1.8</target> 
     </configuration> 
   </plugin> 
  </plugins> 
</build> 
 | 
SOLUTION - 3
- Go to project root folder in your local disk
 - Go to .settings folder
 - Open org.eclipse.wst.common.project.facet.core.xml file and change the below
 
<installed facet="jst.web" version="3.0"/>
- Restart the Eclipse and Update your Maven Project.
 
SOLUTION - 4
- Go to web.xml and update the <web-app> below.
 
<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"> 
 | 
- Clean the Project & Update your Maven Project.
 
Hope any of the above solutions will resolve this issue.
Happy Knowledge Sharing!!!
No comments :
Post a Comment