tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: appBase
Date Sun, 03 Feb 2008 11:00:26 GMT
Paul Wallace wrote:
> Hi,
> Using Tomcat 5.5 I wish to provide my own appBase to a relative or fully
> formed path e.g:
>        <Host name="localhost" appBase="C:/mypath/mysite"
>        unpackWARs="true" autoDeploy="true"
>        xmlValidation="false" xmlNamespaceAware="false">
> or
>        <Host name="localhost" appBase="../../mysite"
>        unpackWARs="true" autoDeploy="true"
>        xmlValidation="false" xmlNamespaceAware="false">
> (assuming mysite is two folders above CATALINA_HOME)
> Neither work and an HTTP 400 is returned. 
> This stops the show also in server.xml:
> <Context path="/" docBase="../../site" privileged="false"
> antiResourceLocking="false" antiJARLocking="false"/>
> How do I point the root of the said release of Tomcat at, preferably, a
> folder relative to CATALINA_HOME?
> Thanks
> Paul.

Your web application should have the following folder structure:




To deploy the default application for a host, set %APPNAME% to "ROOT" - 
case *is important*, e.g.


Which would require, in your server.xml:

  <Host name="localhost" appBase="/path/to/appbase" unpackWARs="true" 
autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">...

and in your META-INF/context.xml

  <Context privileged="false" antiResourceLocking="false" 

Note that there is no need for the 'path' or 'docBase' attributes when 
the application is deployed in this (the heavily recommended) way.

1. ROOT is a special name for the default application.

2. Defining the context in its own file means that modifications can be 
made to it and the app redeployed without the whole server being restarted.

3. The application layout is that of an expanded WAR, placed in the appBase.



To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message