Tomcat – War deployed in Tomcat not showing up at URL, getting 404 instead

http-status-code-404tomcattomcat6

I have a web app which Tomcat says it has deployed, but when I go to its URL, I get a 404.

The war file is called sonar.war, and is deployed in WebApps. I can see in the logs that it is deploying (also by the fact that it will recreate its database tables if I drop all the tables and restart Tomcat), and by using JConsole I can see that it is in Mbeans->Catalina->Host->Localhost->Attributes->children as a webmodule.

Also on the same machine is hudson.war, which works fine – I am certain that I am connecting to the correct machine because I can remove the hudson.war and Hudson disappears from the URL.

There is nothing in the logs; I have tried changing the log level to include more information, but I still see nothing.

Any ideas/suggestions? I am happy to attach a debugger to the Tomcat instance if necessary in order to try and work out what is happening, but I'm not sure what the entry point is, so pointers to where I might want to stick a breakpoint would also be appreciated.

I am using Tomcat 6, and there is nothing in front of Tomcat (such as Apache).

Best Answer

Setup a server with the manager application and deploy the war there. The manager will show you what the URL path it deploys to. You can try that path on your real Tomcat server.

For test deployments, I leave the manager application installed so that problems like this are easier to resolve. The application could also be deploying, but having other problems causing it problems binding to its context.

Related Topic