Project project to Web project in eclipse

Source: Internet
Author: User

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

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.