How to deploy a war file in Tomcat 7

John picture John · Feb 24, 2011 · Viewed 873.4k times · Source

I have copied the sample.war file into the webapps directory of Tomcat, and I can access localhost:8080.

Now how will Tomcat deploy it, I mean do I need to open it in browser? How can I access the application?

Answer

Bozho picture Bozho · Feb 24, 2011

You can access your application from: http://localhost:8080/sample

Deploying or redeploying of war files is automatic by default - after copying/overwriting the file sample.war, check your webapps folder for an extracted folder sample.

If it doesn't open properly, check the log files (e.g. tomcat/logs/catalina.out) for problems with deployment.