Unlike Microsoft's offerings, Java is intensely engineered to ensure backwards compatibility. Except in very rare cases, taking code that was developed for Java 1.4 and running it under a Java 5 or 6 VM should not make any difference whatsoever. And in the rare cases where it does, it's likely that the code wasn't really clean even for Java 1.4.
Tomcat 5.0 runs under Java 1.4, but I don't recommend that. Tomcat 5.5 runs under Java 1.5. In most cases, I recommend going straight to Tomcat 6, however. Do be aware that there are some small differences in setup for Tomcat 6, though. Most notably, instead of 3 library directories, Tomcat 6 has only 1.
Returning to the primary question, once you start running in a Java 5 environment, as long as you compile for Java 1.5 or later, the Java 1.4 code will just be Java 5 code that doesn't use Java 5 features as far as the system is concerned.
An IDE is no substitute for an Intelligent Developer.