tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AH NF <inter...@yahoo.com>
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/ 
myAppBase"

b) a WAR file named ROOT.war. Inside there is a context.xml located in  
META-INF
      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  
follows
	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="mydomain1.net"
>          appBase="home/web/mydomain1.net/webapps"
>          unpackWARs="true"
>          autoDeploy="true">
>      </Host>
>
> Context file location (for ROOT webapp):
> /tomcat_home/conf/Catalina/mydomain1.net/ROOT.xml
>
>
> Contents of .../mydomain1.net/ROOT.xml:
> <Context path=""
>      docBase="/some/other/path/foobar.war"
>   reloadable="true">
> </Context>
>
> The docBase *must not* be under the appBase (home/web/mydomain1.net/ 
> webapps)
>
> Mark
>
>
> ---------------------------------------------------------------------
> 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
>



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