tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Schönhaber <tomcat-us...@list-post.mks-mail.de>
Subject Re: Tomcat 5.5 context.xml, how to configure the Host element
Date Tue, 26 Aug 2008 12:20:23 GMT
jerrycat wrote:

> Here is the context.xml
> <Context path="" docBase="C://Program Files//Apache Software
> Foundation//Tomcat 5.5//webapps//test"> 
[...]
> </Context>

Please read the docs:
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
Especially the last paragraphs in the descriptions of the docBase and 
the path attributes.
You have not mentioned how you are going to deploy your webapp. 
Therefore I'll simply assume you want to autodeploy a war file or an 
exploded war file.
In this case, remove the path and docBase attributes from the Context 
element.

> and here is the Host element in the conf/server.xml
> <Host name="www.test.com" deployOnStartup="true" debug="0" appBase="webapps"

Set the appBase attributes for all your Host elements to different paths 
and make sure that not one is contained in another. For example, if 
you've got two hosts, "localhost" and "www.test.com", you could 
configure them like that:
<Host name="localhost" appBase="webapps/localhost" [...]
and
<Host name="www.test.com" appBase"webapps/test" [...]

If you want a webapp to be accessible via www.test.com, drop the 
corresponding war file into $CATALINA_BASE/webapps/test.
If a webapp shall be the default Context for a given Host, name it 
"ROOT" and deploy it to the Host's appBase.

> unpackWARs="true" autoDeploy="true" xmlValidation="false"
> xmlNamespaceAware="false"> 
[...]
> </Host>

Regards
   mks

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


Mime
View raw message