The project was set up as project and it felt awkward, so the conversion was done manually, with the following steps:
1. Go to the project directory and see the. project file, open, find <natures>...</natures> code snippet.
2. Add the following code to the <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>
3. On the Eclipse project, right-click to refresh the project
4. Right-click on the project to enter properties
5. Click on "Project Facets" in the list item on the left, select "Dynamic Web Module" and "Java" on the right, click OK to save.
since our system used the original web directory name is Webroot, so, the system automatically generated a webcontent directory, this does not matter, directly deleted, and then into the project directory. Locate the Org.eclipse.wst.common.component file in the. Settings directory.
There is such a sentence "<wb-resource deploy-path="/"source-path="/webcontent "/>", webcontent can be changed to Webroot.
now that everything has been done, you can try to run it, point run as tragic, error "The server does not support version 3.0 of the" Java EE Web Module specification ", checked Information, the original in the. Settings directory has a org.eclipse.wst.common.project.facet.core.xml file, which has such a sentence "<installed facet=" Jst.web " version= "3.0"/> "Change it to" <installed facet= "Jst.web" version= "2.5"/> ", Save, refresh project, run again, ok!
Project project to Web project in eclipse