(please only reply to the list).

What errors are described in tomcat/logs/catalina.out or any other relevant log files? (e.g. the log for localhost)

Which OS are you deploying on?

p



Paul Wallace wrote:
Thanks Pid,

My folder structure is as you expected.
In server.xml I have:

<Host name="localhost" appBase="C:/myapp.build.target/gs-mydir/site"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false">

and in
C:\myapp.build.target\gs-mydir\site\META-INF\context.xml

<?xml version="1.0" encoding="UTF-8" ?>

  <Context privileged="false" antiResourceLocking="false"
antiJARLocking="false"/>

An HTTP 400 error is still returned however when the server is started and I
access localhost.

I am not unpacking any WAR.

Thanks

Paul.

-----Original Message-----
From: Pid [mailto:[EMAIL PROTECTED] Sent: Sunday, February 03, 2008 10:00 PM
To: Tomcat Users List
Subject: Re: appBase

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]



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




---------------------------------------------------------------------
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