From: http://blog.csdn.net/hongchangfirst
Since previous projects were developed using myeclipse, we need to switch to eclipse for development. However, when the project is imported to eclipse, it is found that the project is not a web project and cannot be deployed to Tomcat. Now this problem has been solved.
1. Make sure that the eclipse version on your machine is javaee or you have installed the WTP plug-in.
2. Close the project and modify the. project file under the Eclipse project:
In <natures> </natures>, add
<Nature> org. Eclipse. WST. Common. Project. facet. Core. Nature </nature>
<Nature> org. Eclipse. WST. Common. modulecore. modulecorenature </nature>
<Nature> org. Eclipse. Jem. workbench. javaemfnature </nature>
In <buildspec> </buildspec>, add
<Buildcommand>
<Name> org. Eclipse. WST. Common. Project. facet. Core. Builder </Name>
<Arguments> </arguments>
</Buildcommand>
<Buildcommand>
<Name> org. Eclipse. WST. validation. validationbuilder </Name>
<Arguments>
</Arguments>
</Buildcommand>
3. Open the project, refresh the project, right-click the project, choose Properties> Project facets> modify project, and select Java and dynamic web module.
Configure the context root, content directory, and source code path. For more information, see http://blog.csdn.net/hongchangfirst/article/details/7896283