Why did my WAR file automatically explode in Tomcat?

In Tomcat, I found that .war would automatically explode. Is this behavior expected?

+7
source share
2 answers

Check out the unpackWARs server.xml option:

 <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"> 

I think that work on an exploded archive is faster (I have no idea if Tomcat explodes a file in memory when unpackWARs is false or uses some other method).

+17
source

Is this behavior expected?

Yes. This is the default behavior: see Contextual documentation ... and search for unpacking.

You can change this based on each web client using the Context container or you can change it for all web applications using the Host container.

+3
source

All Articles