MouJian
MouJian

Reputation: 201

apache-tomcat 7.0 does not unpack .war?

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?

Upvotes: 6

Views: 14065

Answers (1)

Mark Thomas
Mark Thomas

Reputation: 16660

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.

Upvotes: 12

Related Questions