简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM