[java development series] – Tomcat compilation error

There was a portable web project in eclipse before, but I found the problem when I logged in to the IDE again after I was useless for a long time

First of all, there are two versions of JDK in my computer, 1.6 and 1.7. Two versions of Tomcat 6 and 7 and two versions of eclipse ide 3.5 and 4.0 +

 

When I start the development environment and want to add an application to the server, I find an error:

There are no resources that can be added or removed from the server.

How can my previously easy-to-use application not work well. So I deleted the server and added it again. When I added Tomcat6, I found the following error:

Tomcat version 6.0 only supports j2ee 1.2 1.3 1.4 and java ee 5 web modules.

When I add 7, I find the following errors:

Project facet java version 1.7 is not supported

See the error report above, don’t think about it! It must be the version

 

It’s strange that 6 and 7 don’t work well. Search the Internet for information. The original project has a file: org. Eclipse. WST. Common. Project. Facet. Core. XML

<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
  <fixed facet="wst.jsdt.web"/>
  <fixed facet="jst.web"/>
  <fixed facet="java"/>
  <installed facet="java" version="1.7"/>
  <installed facet="jst.web" version="3.0"/>
  <installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>

The JDK used for the compilation of the project and the version of jst.web are configured in this file. It can be found that I use 1.7 in the above configuration file, but my native JDK is 1.6

Therefore, change this to 1.6 test, and change the corresponding JST. Web to 2.5. The specific function of this configuration file needs to be studied under Tomcat. I can’t find the description of this configuration file. Send a blog and ask

Similar Posts: