deploy war file in tomcat server
Asked Answered
H

2

21

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.

Herndon answered 9/11, 2012 at 3:54 Comment(0)
N
23

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 your server.xml file contains 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.

Nickolai answered 9/11, 2012 at 4:17 Comment(9)
i have wrote this localhost:8080 means am getting following messages.please refer this:screencast.com/t/9h7ytkXRFYz here Tomcat Manage is not available.Herndon
@user1796222- can you modify your server.xml file as shown above. Also please tell me your resultNickolai
this code only saved in my server.xml file.autoDeploy="true" unpackWARs="true".Herndon
i have uploaded one war file yesterday.it is successfully exported and displayed listservices successfully.but today i have upload another war file it is doesn't exported.Herndon
@user1796222- try to login to tomcat. And check your old deployed application is still there. If yes click undeploy. After that try to copy war file into webapps folderNickolai
why i have to undeploy the old one.i have to deploy both war file.Herndon
i got the solution for this.Herndon
@user1796222- i thought you modified you war file and you need to redeploy the app. Thats why i told to undeploy oldNickolai
These values are the default. I am facing the same issue I haven't touched those values.. they are trueBlower
F
3

In general this happens when you have 2 Tomcats. If CATALINA_HOME is referring to Tomcat-A and you are trying to run Tomcat-B from Tomcat-B/bin/startup.bat. It will run Tomcat-A. Hence your war which you are trying to deploy in Tomcat-B will not be extracted as Tomcat-A is running in actual.

Flimsy answered 8/10, 2013 at 15:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.