After importing a new Web project, a red fork appears on the newly imported Eclipse project, but the code that has been written does not indicate where there was an error, checked the jar package, and found no problem.
Run the project, found that no error, all functions can be performed normally without affecting the operation of the program.
Last look at the problems: found prompt to have a errors=>>target runtime XXX is not defined
Solution:
(1) in the. Settings folder in the project directory, open the Org.eclipse.wst.common.project.facet.core.xml file with the following contents:
<?xml version= "1.0" encoding= "UTF-8"?>
<faceted-project>
<runtime name= "Server1"/>
<fixed facet= "Java"/>
<fixed facet= "Wst.jsdt.web"/>
<fixed facet= "Jst.web"/>
<installed facet= "java" version= "1.7"/>
<installed facet= "Jst.web" version= "2.5"/>
<installed facet= "Wst.jsdt.web" version= "1.0"/>
</faceted-project>
(2) Delete all the contents of the middle, leaving the content below to:
<?xml version= "1.0" encoding= "UTF-8"?>
<faceted-project>
</faceted-project>
(3) Reason: Imported Web project the configuration in the XML file and your current configuration to be inconsistent, you did not define the file specified by the server