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:

 /path/to/appBase/%APPNAME%/
 /path/to/appBase/%APPNAME%/index.jsp

 /path/to/appBase/%APPNAME%/META-INF/context.xml

 /path/to/appBase/%APPNAME%/WEB-INF/web.xml
 /path/to/appBase/%APPNAME%/WEB-INF/classes
 /path/to/appBase/%APPNAME%/WEB-INF/lib


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

 /path/to/appbase/ROOT/WEB-INF/web.xml


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" antiJARLocking="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.



regards,

p





---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to