tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Host appBase
Date Fri, 08 Nov 2013 21:54:59 GMT
Hash: SHA256


On 11/8/13, 12:18 PM, Leo Donahue - OETX wrote:
> Tomcat 7.0.47
> Reading over the security benchmark I posted a link to earlier,
> there is one that suggests to separate out the web content
> directory from the Tomcat system files.  Reading the Tomcat docs
> for appBase, I see I can set this value.
> Reading further down in the Tomcat docs for Host, other questions
> have spawned... and I blame it on being Friday.
> 1.  When/Why would I change the xmlBase directory location?  For
> the same reasons I would change the appBase directory?
> 2.  What is the benefit of un-packing WAR files? a.  If you drop a
> WAR file into your webapps directory (appBase I guess), and it
> unpacks, should you leave the WAR file there or remove it?
> 3.  WAR files located outside of the Host's appBase will not be
> expanded... a.  Why would I deploy WAR files outside of the Host's
> appBase? b.  Where are those deployed?  By specifying the docBase?
> 4. What is the difference exactly between appBase and docBase?

appBase is where webapps for a host generally live. You'll find WAR
files and expanded-WAR directories that will be deployed as contexts.
You can disable autoDeploy and deployOnStartup and then basically
appBase is no longer relevant (unless you just want to continue to use
it in that capacity, but use e.g. the Manager webapp to deploy
everything). You specify appBase in a <Host> element in server.xml.

docBase is the root of a specific webapp. Unless you put your
WAR/exploded-WAR-dir outside of Tomcat's autoDeploy directory (that
is, appBase), you generally don't have to specify this. You specify
docBase in a <Context> element in those places where <Context>s are

> If the Context is specified in server.xml, I can have an appBase
> and a docBase?

The context only has a docBase. appBase has no meaning for a single

> I know docBase has to be set outside of the Host's appBase, but why
> would I have two locations for WAR files?

You might not want to auto-deploy. Or you may want to host Tomcat on
one disk but your webapp on another. There are lots reasons to put WAR
files in places other than the appBase but under normal circumstances,
you just drop your WAR file into the <Host>'s appBase and and call it
a day.

- -chris
Version: GnuPG v1.4.15 (Darwin)
Comment: GPGTools -
Comment: Using GnuPG with Thunderbird -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message