Java Web Project not building correctly

A few steps to perform to restore sanity...

  1. Refresh your project. It is possible that something was modified on the file system external to Eclipse.

  2. Kick of Project -> Clean.

  3. Now look at your project (not the deployed location) on the file system. Do you see the expected files in the /bin directory (or whatever you may have changed class output directory to)?

  4. Let's now try exporting a war using the wizard. File -> Export -> Web -> WAR or something like that. Check the WAR contents. Are you .class files there?

  5. If everything is good so far, there is nothing wrong with your project. The Tomcat server adapter just got confused.

  6. In the Servers view... Make sure Tomcat is running. Next right click on Tomcat and select add/remove projects. Remove your project. Confirm that your web app is no longer accessible.

  7. Now re-add your project via add/remove projects or invoke one of the run as actions.

The above should reset Tomcat server adapter and hopefully things should work as expected.