deploy war file in tomcat server

user1796222 picture user1796222 · Nov 9, 2012 · Viewed 95.3k times · Source

I have copied the sample.war file in webapps directory of tomcat.

I can acess localhost:8080.

deploying of wars is automatic by default -i have checked my webapps folder for an extracted folder "sample"

but it is not extracted.why the war file is doesn't extracted.please give me solution for this.

Answer

Fathah Rehman P picture Fathah Rehman P · Nov 9, 2012

Delete that war file from webapps/ directory. Then open link http://localhost:8080/ in your web browser. Click Tomcat Manager then enter user name and password. In next page you can see one option called "WAR file to deploy". Select your war file from there and click "deploy" button.

If you want auto deployment when you copy files to webapp/ directory. Then make sure that you server.xml file contains the following values:

autoDeploy="true"
unpackWARs="true"

Just search these values in your server.xml file and edit values as shown above

For more info see Deploy A New Application from a Local Path.