Hmmm..., I'm adding to this on the "better late than never" plan?!
I'm adding this response because I had the problem today. Googling led me to this answer, which seems to have pleased Matthew, but which didn't help me. I also found it either inadequately or not at all answered elsewhere. Here is my experience. I hope this will benefit someone; certainly it's worth a few bits and bytes of disk space to record it somewhere.
I have an Eclipse workspace with 5 projects. Two of them consume a Server. I needed to bump one of the two forward to Java 5 (at long last), but the other one needed to remain at Java 1.4 because it runs on NetWare (and though the Java 5 port was done and healthy, Novell refused to deliver it on their now more or less defunct platform). This second piece of information is obliquely related to this question.
The error I got in the Eclipse Problem tab of the workbench was:
Project facet java 5.0 is not supported by target runtime Apache Tomcat v5.5
The root of the problem appears to be that the Apache Tomcat v5.5 server set up in Eclipse had the JRE 1.4 in it (since I've long been running with the Java 1.4 requirement for the two projects in question and only just now am moving one of them forward).
To reach my successful solution, I followed these steps. This may be over-kill, but one of them along the way might be your problem:
0. I right=clicked on the project corresponding to the stated error. I chose
Properties. Then I did the following
1. Expand
Java Build Path; ensure the following under
Libraries:
Apache Tomcat v5.5 [Apache Tomcat v5.5.]
JRE System Library [jdk1.5.0_17]
2. Expand
Java Compiler; ensure that the compiler compliance level is set to 5.0.
3. Expand
Server; ensure that "Tomcat v5.5 Server at localhost" is present. If not, this is created elsewhere in the Eclipse interface and I'm not going to show that here.
4. Expand
Targeted Runtimes; ensure that "Apache Tomcat v5.5" is present. Click on it. In the
Runtime Composition window (second window),
you should see:
Apache Tomcat v5.5
JRE 5.0: jdk1.5.0_17 <-- this is where mine, which had been set up for Java 1.4, was wrong
5. Finally, open the
Servers window, usually at the bottom pane of the workbench (along with the Problems window). There should be (corresponding to the expand Server property above) "Tomcat v5.5 Server at localhost". Click on that; note both
project1
project2
are present (the two projects using this server).
Later, you may need to re-set up a server for the other project which must continue to use JRE 1.4. You may need to create a second "Apache Tomcat v5.5 (2)" (thus named) and set inside it JRE 1.4. I did not have to do this. I'm getting away with this probably because my projects are complex enough that only one member of our development team has ever been successful at running (and debugging) under Eclipse control. Traditionally, everyone else has resorted to reading system log output from the two applications. I know this is lame, but for now, that's how it is.