When Eclipse imports a MyEclipse project, it cannot be recognized as a web project.

When importing a web project developed by MyEclipse into Eclipse, there will often be a problem that the project type cannot be transferred. After importing, it will be a Java project. How to solve this problem?

Solution steps:

1. Enter the project root directory, find the .project file and open it

2. Add the following content to the <natures>...</natures> code snippet:

1

2

3

<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. Right-click on the project to refresh the project

4. Right-click on the project and select Properties to open the project properties dialog box

5. Select "Project Facets" in the list on the left, select "Dynamic Web Module" and "Java" on the right, and select the corresponding version

6. Select "Deployment Assembly" in the list on the left, select "/WebContent" on the right, and click Remove. Then click Add——>Folder, select WebRoot


Guess you like

Origin blog.51cto.com/12402007/2668344