Java.myeclipse Web Project Import eclipse

Source: Internet
Author: User
Tags apache tomcat

Java project, the development of the saved directory structure and configuration in MyEclipse, is not directly imported and run in eclipse; Sometimes we encounter the need to import the MyEclipse project into Eclipse, and the process is documented as follows:

First, import the MyEclipse project directly into Eclipse, and then follow the steps below to modify the configuration

Environment: Myeclipse9.0+tomcat6. X+j2ee5

1. Add in the <natures></natures> of. Project

Java code

<!--start-to-      <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>  <!--end--  

2. Add in the <buildSpec></buildSpec> of. Project

Java code

<!--start-to-      <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, refresh the project, select Project, click Project->properties->project facets-> Select Java and dynamic Web Module->ok

4. Locate the Org.eclipse.wst.common.component file in the. settings

Modify Source-path as the original project's publishing directory (for example: WebRoot)

Java code

<project-modules id= "Modulecoreid" project-version= "1.5.0" >      <wb-module deploy-name= "cams" >          <wb-resource deploy-path= "/" source-path= "/<span style=" color: #ff0000; " >WebRoot</span> "tag=" Defaultrootsource "/>          <wb-resource deploy-path="/web-inf/classes " Source-path= "/src"/>          <property name= "context-root" value= "cams"/>          <property name= " Java-output-path "value="/cams/webroot/web-inf/classes "/>      </wb-module>  

5. Locate the Org.eclipse.wst.common.project.facet.core.xml file in the. settings

Java Code

<faceted-project>    <runtime name= "Apache Tomcat v6.0"/>    <fixed facet= "Wst.jsdt.web"/>    <installed facet= "java" version= "1.6"/>    <installed facet= "Jst.web" version= "<span style=" line-height:1.5; Color: #ff0000; " >2.5</span> "/>    <installed facet=" Wst.jsdt.web "version=" 1.0 "/>  </faceted-project >  

Note:

1. In the 3rd, if you can change the dynamic Web module version to 2.5, you do not need to change version in Org.eclipse.wst.common.project.facet.core.xml.

2, before the completion of 2 steps to see if the project can be released, you can then OK, no more try the back.

Java.myeclipse Web Project Import eclipse

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.