tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AH NF <>
Subject Re: Virtual Hosts: path="/" without using ROOT folder?
Date Wed, 27 Feb 2008 00:03:55 GMT
Here is what I have setup going off the examples, but it is not  
working like a I would like

a) a Host definition in my server.xml which has appBase="tomcatHome/ 

b) a WAR file named ROOT.war. Inside there is a context.xml located in  
      I am not sure what to put in for the path and/or docBase  
attributes. I would prefer not to have to defined the context in  
Catalina/<hostname>/ROOT.xml, i would like the context.xml to go along  
inside the WAR

c) I upload the root.war file to my Host above via the Manager app  
(which I also have configured for the host)

d) Tomcat accepts the war and puts it in the appBase above.

e) Tomcat extracts the WAR file but I get a directory structure as  
	tomcatHome/myAppBase/ROOT/ROOT/<my extracted files>

The app also never starts. Basically I just want to have one virtual  
host per-war that I need to deploy to it. I don't want to have to  
defined the context on the server and would like to have it defined in  
META-INF. Each WAR is a one-to-one with a virtual host and when  
deployed via manager, or ant, I want it to respond to the http:// 
<hostname>/  as the default / context for that tomcat host.

thanks for the assistance.

On Feb 26, 2008, at 1:40 PM, Mark Thomas wrote:

> Lessie Z. Mitch wrote:
>> Sorry.. didn't finish... (hit the damned button)
>> And my application context.xml files would read something like...
> No - completely wrong. In short (just doing one host) you want  
> something like:
> /tomcat_home/conf/server.xml
> <!-- virtual host mywebapp1 -->
>      <Host
>          name=""
>          appBase="home/web/"
>          unpackWARs="true"
>          autoDeploy="true">
>      </Host>
> Context file location (for ROOT webapp):
> /tomcat_home/conf/Catalina/
> Contents of .../
> <Context path=""
>      docBase="/some/other/path/foobar.war"
>   reloadable="true">
> </Context>
> The docBase *must not* be under the appBase (home/web/ 
> webapps)
> Mark
> ---------------------------------------------------------------------
> To start a new topic, e-mail:
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message