How to import myeclipse-developed projects into Eclipse run

Source: Internet
Author: User
Tags tomcat

Since the previous projects were developed using MyEclipse, it is now time to switch to eclipse. However, the project was imported into eclipse and found that the project was not a Web project and could not be deployed to Tomcat. This problem has been solved now.

   First, make sure that eclipse on your machine is a Java EE version, or that you have installed the WTP plugin 

   two. Close project first, and then modify the. project file under Eclipse Engineering: 

      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> 

Join in the

<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> 

Three. Open project, and then refresh the project, right-click->properties->project facets->modify Project in projects, select Java and dynamic Web Module
Configure the context Root and content Directory and the source path.

This will solve the problem.

Method Two:

In direct import
After the MyEclipse project file is imported into eclipse, you need to modify the. project file under the Introduction project directory in the workspace that you put in the project, and modify the following:
1. Create a new Web project in Eclipse to overwrite the. project file under the root directory in the same directory as the exported project.
2. Open the. project file of the imported project and modify the value in the middle of the test.
After that, the project project file is refreshed. Then, right-click Project-->properties--> Select Project Facets, tick dynamic Web module and Java, and tick tomcat in runtime.
Then go to the project directory and modify the Org.eclipse.wst.common.component within its. Settings directory.

Then refresh the project project file, delete the webcontent, and publish and run it in Tomcat.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.