Sometimes importing a web project into eclipse will become a general java project, so that it cannot be deployed to the web server. The following methods can be used to convert a java project to a web project:
1. Open the disk path of the project to be converted in Eclipse, find the. project file in the root path, and open it! Find Label. For java projects, only
Org. eclipse. wst. common. modulecore. ModuleCoreNature
Org. eclipse. wst. common. project. facet. core. nature
Org. eclipse. jdt. core. javanature
Org. eclipse. wst. jsdt. core. jsNature
Without Org. eclipse. jem. workbench. JavaEMFNature Therefore, you need to paste the sentence from a normal web project.
2. In Eclipse, select Project --> right-click --> properties --> Project Facets and select the check boxes before "Dynamic Web Module 2.3" and "Java, click Apply ---> Save and refresh the project to become a Web project!
3. Sometimes a dynamic web module 3.0 requires java 1.6 or newer error occurs. You need to modify the selected project --> right-click --> properties -- Java Compiler to 1.6 for compilation, then, repeat the second step.