Tomcat + Vaadin .war file deployed, but still gives me 404

I have a very strange error, I finished my project, made the .war file, but when I put it in the Tomcat_HOME/webapps folder, and it also deploys, but it’s not showing up in the browser, instead it gives me the 404 error: The requested resource (/MyProject/) is not available. I made a war file earlier from this project, and that one works fine! The web.xml deployement descriptor haven’t been changed since then. I also tried it on another machine, tried it with the newest Tomcat. It runs fine in eclipse, but just wont run as a war. Tomcat deploys the war, it gets extracted, no errors, logs are normal, no error there either, but when I enter localhost:8080/MyProject/ it just doesn’t show…

I tried it to make the war file like a 100 times, with different parameters. The older war runs fine, but my finished version isn’t running at all, well it gets deployed but won’t show. And since it doesn’t give me any error or feedback, not even in the logs, I have no idea what could be the problem.

Some sanity checks & troubleshooting ideas:

  1. Make sure the servlet mapping in the web.xml really is /* (everything gets served by the servlet)
  2. Unzip the zile and see that there aren’t any extra folders as root (I’ve seen packages with project folder as root inside war)
  3. Clean Tomcat work folder TOMCAT_HOME/work/Catalina/…
  4. Check Java class version compatibility

This problem sounds very tricky and I’m not sure whether I can help, but let’s try.

How do you build your war file? With an eclipse export functionality or by some (ant or maven) build script? Did you already tried to build it into the working war by replacing the old (working) jars and classfiles with the new ones?

Check also your application’s deployment status from the Tomcat’s administrative/manager view (localhost:8080/manager).

And, finally try also (if not already tried) accessing your application without that last slash ‘/’ in the url.