tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: Error 404 when redirected
Date Thu, 07 Oct 2010 11:50:55 GMT
> From: arnaud icard [mailto:arnaud.icard@univ-avignon.fr] 
> Subject: Error 404 when redirected

> I am currently installing and configuring a 
> webserver with the couple httpd/tomcat.

Exact versions?

> My current Tomcat configuration is something like that :
> <Host name="appli1.domain.fr"  appBase="/var/www/appli1" 
> unpackWARs="true" autoDeploy="true" xmlValidation="false"
> xmlNamespaceAware="false">
>    <Context path="" docBase="/var/www/appli1" crossContext="false">

The above is seriously broken.  First, it is absolutely illegal to have the appBase the same
as docBase.  Second, you should not be placing <Context> elements in server.xml.  Third,
each <Host> should have a unique appBase directory.  Fourth, the default webapp for
a given appBase must be named ROOT (case sensitive).

Remove the <Context> elements from server.xml, and restructure your file layout to look
like this:

/
var/
  www/
    appli1/
      ROOT/
        META-INF/
          context.xml
        WEB-INF/
          classes/
          lib/
        <other appli1 directories and files>
    appli2/
      ROOT/
        META-INF/
          context.xml
        WEB-INF/
          classes/
          lib/   
        <other appli2 directories and files>

The context.xml file in each ROOT's META-INF directory can actually be omitted for the two
webapps you showed, since it would contain no useful information (the path and docBase attributes
must not be used here).  Only if you had some non-default attribute to specify would you create
a <Context> element inside it.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus
for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message