Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is my WAR file automatically exploded in Tomcat?

In Tomcat, I found the .war will be automatically exploded. Is this the behavior expected?

like image 346
user496949 Avatar asked Mar 06 '11 21:03

user496949


2 Answers

Check out unpackWARs option in server.xml:

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

I guess working on exploded archive is faster (I have no idea whether Tomcat explodes the file in-memory when unpackWARs is false or uses some other technique).

like image 188
Tomasz Nurkiewicz Avatar answered Oct 01 '22 05:10

Tomasz Nurkiewicz


Is this the behavior expected?

Yes. This is the default behavior: see the Context config documentation ... and search for unpackWARs.

You can change this on a per-webapp basis using the Context container or you can change it for all webapps using the Host container.

like image 23
Stephen C Avatar answered Oct 01 '22 05:10

Stephen C