I want to deploy my app to the server, and then I can visit the app like this:
http://10.10.10.10/index.jsp
but not
http://10.10.10.10/bar/index.jsp
so this is my host configuration in server.xml:
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Context docBase="/home/foo/bar.war" reloadable="false" path=""/>
</Host>
But, after I start up tomcat
sh $CATALINA_HOME/bin/startup.sh
I found that tomcat does not unpack the war file in $CATALINA_HOME/webapps. then I try to delete all files in $CATALINA_HOME/webapps/ROOT, but it does not matter. so is there someone come cross this issue before? and how to solve the probelm?
Try stopping Tomcat, deleting the war and matching folder, copying the new war in, then starting Tomcat. If it works then, the problem might be left over files. (I have an app for example that doesn't completely clean itself up). (3) The app might not be initializing properly due to issues with the app.
The definitive way to determine if a war has finished deploying and the webapp has started is to look in the catalina. out log. A message will be logged. In operational terms, Tomcat will respond to a request made to that webapp in various ways depending on how far along it is.
Perhaps the simplest way to deploy a WAR file to Tomcat is to copy the file to Tomcat's webapps directory. Copy and paste WAR files into Tomcat's webapps directory to deploy them. Tomcat monitors this webapps directory for changes, and if it finds a new file there, it will attempt to deploy it.
Tomcat 7 does not unpack WAR files from outside the Host's appBase into the appBase.
Tomcat 7 will run your application from the WAR.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With