Import the WEB Project in myeclipse to eclipse and add it to the server. tomcat6 does not support JDK 6.

Source: Internet
Author: User
Tags apache tomcat
The web project imported from eclipse to myeclipse cannot identify the problem and cannot be added to sever.

1. Go to the project directory, find the. project file, and open it.

2. Find <natures>... </Natures> code segment.

3. Add and save the following TAG content to the code snippet in Step 1:

<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. In the. classpath file under the project directory, change all webroot strings to webcontent and save them.

5. Rename the webroot folder in the directory to webcontent.

6. Add the package required by the Web server to libraries in the Java resources: src directory of Eclipse, choose biuldpath --> Configure build path --> Add library --> Server Runtime --> select the desired web server in the current window.

7. Right-click the Eclipse project and refresh the project.

8. Right-click the project and choose Properties)

9. Click "project facets" in the list project on the left, select "dynamic web module" and "Java" on the right, and click "save.

 

In this case, the project can be started normally in eclipse.

Certificate -----------------------------------------------------------------------------------------------------------------------------------------------------------------------

Tomcat version 6.0 only supports J2EE 1.2, 1.3, 1.4, and Java
Ee 5 web modules uses eclipse as a project. When a new project is created, it uses the latest version. In the dynamic Web module version column, select the latest 3.0 version, when deploying the project, tomcat version 6.0 only supports J2EE 1.2, 1.3, 1.4, and Java ee 5 Web
Modules Error

 

Solution:

Under project. Setting folder, there is a file named org. Eclipse. WST. Common. Project. facet. Core. XML, which contains various versions. Modify the file according to the local configuration, and the problem is solved.

<? XML version = "1.0" encoding = "UTF-8"?>
<Faceted-Project>
<Runtime name = "Apache Tomcat v5.5"/>
<Fixed facet = "JST. Web"/>
<Fixed facet = "JST. Java"/>
<Installed facet = "JST. Java" version = "5.0" type = "regxph" text = "yourobjectname"/>
<Installed facet = "JST. Web" version = "3.0" type = "regxph" text = "yourobjectname"/>
<Installed facet = "WST. jsdt. Web" version = "1.0"/>
</Faceted-Project>
"

You can download Tomcat 7. 0. You can also change <installed facet = "JST. Web" version = "3.0"/> to a lower version = "2.5" in the configuration file"

References: http://lihongxu.net /? P = 37

Http://blog.csdn.net/szzxc/article/details/6782653

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.