Import eclipse from MyEclipse, not recognized as a Web project (Java Project to Web project)

Source: Internet
Author: User

1. Go to the project directory and locate the. project file, open.

2. Find the <natures>...</natures> code snippet.

3, in the 2nd step of the code snippet, add the following label content and save:

<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>

4. Delete the. setting files from other Eclipsejee Web projects [remember to use Eclipse to create a new] file under the. setting file to copy the following files [in fact, the entire folder is copied over]
. jsdtscope
Org.eclipse.jst.common.project.facet.core.prefs
Org.eclipse.wst.common.component
Org.eclipse.wst.common.project.facet.core.xml
Org.eclipse.wst.jsdt.ui.superType.Container
Org.eclipse.wst.jsdt.ui.superType.name
Modify the project name related content in Org.eclipse.wst.common.component

For example, the following jngl_mysql replace your project name.

Then Wb-resource is your resource file, the default is src one. If you're using maven maybe it's src/java/main,src/java/resource these things. Remember to add.

[HTML]View PlainCopyprint?
  1. <? XML version= "1.0" encoding="UTF-8"?>
  2. <project-modules id="Modulecoreid" project-version="1.5.0">
  3. <wb-module deploy-name="Jngl_mysql">
  4. <wb-resource deploy-path="/" source-path="/webroot" tag= "defaultrootsource" />
  5. <wb-resource deploy-path="/web-inf/classes" source-path="/src"/>
  6. <property name= "context-root" value="Jngl_mysql"/>
  7. <property name= "java-output-path" value="/jngl_mysql/web-inf/classes"/>
  8. </wb-module>
  9. </project-modules>

Then there is the. jsdtscope file, which remembers to change your output path.

[HTML]View PlainCopyprint?
  1. <? XML version= "1.0" encoding="UTF-8"?>
  2. <classpath>
  3. <classpathentry kind="src" path="WebRoot"/>
  4. <classpathentry kind="Con" path="Org.eclipse.wst.jsdt.launching.JRE_CONTAINER" />
  5. <classpathentry kind="Con" path="Org.eclipse.wst.jsdt.launching.WebProject">
  6. <attributes>
  7. <attribute name="Hide" value="true"/>
  8. </attributes>
  9. </classpathentry>
  10. <classpathentry kind="Con" path="Org.eclipse.wst.jsdt.launching.baseBrowserLibrary" />
  11. <classpathentry kind="Output" path= ""/>
  12. </classpath>




5. Right-click on the Eclipse project to refresh the project.

6, right-click on the project, enter the property (properties)

7, click on the list item on the left to select "Project Facets", on the right side to see not the "Dynamic Web Module" and "Java", if there is a success, if not, select.

Import eclipse from MyEclipse, not recognized as a Web project (Java Project to Web project)

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.