In Eclipse, a common java project is converted into a Web project, eclipseweb

Source: Internet
Author: User

In Eclipse, a common java project is converted into a Web project, eclipseweb

After importing a web project created by myeclipse in eclipse, it is displayed in Eclipse as a java project. You can convert it into a web project by following the steps below.

1. Find the. project file in the project directory.

2. Edit the. project file and find <natures>... </natures>

Add the following code to the node found in 3 and 2

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

4. Refresh the project in eclipse or restart eclipse

5. Right-click a project and select Properties.

6. Find the Project Facets in the list on the left, select "Dynamic Web Module" and "Java" on the right, and click "OK"


How can I import a java non-Web project into Eclipse into a Web project?

The idea is as follows: the first choice is to follow the structure specifications of the javaEE web directory. If you are using tomcat as the servlet engine server, then install a tomcat plug-in.

How to convert a Java project to a WEB project in Eclipse

2. Find the <natures... </natures code segment. 3. Add the following TAG content to the code snippet in step 1 and save it: <natureorg. eclipse. wst. common. project. facet. core. nature </nature <natureorg. eclipse. wst. common. modulecore. moduleCoreNature </nature <natureorg. eclipse. jem. workbench. javaEMFNature </nature4. Right-click the eclipse project and refresh the project. 5. Right-click the Project and choose properties. 6. Select Project Facets from the list Project on the left, and select Dynamic WebModule and Java on the right ", click OK to save.

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.