You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tim Diggins <su...@red56.co.uk> on 2006/03/05 08:42:13 UTC

help with context fragments (+virtual hosts) under windows

Hi -

I've never used context fragments to deploy before (have either put 
context fragments into the server.xml, old tomcat4 style, or have used 
web/ant interface for deployment, or just dropped wars into webapps).

so I'm now trying to use the context fragment method and have been 
tearing my hair out. (nothing deploys). I've reverted to bunging the 
contexts into the server.xml, cause I can't make it work, but would like to.


This occurs on my development machine. here are the critical factors:
* tomcat 5.5.15
* window xp (my development machine)
* java 1.5 p6
* tomcat virtual hosts (set up in server.xml) with autoDeploy=True

I'm wondering if this is a bug with some combination of (windows + 
virtualhosting + context fragments), but haven't seen any discussion of 
this via google, or via tomcat bugzilla.
Or maybe I'm just doing something stupid that's staring me in the face.


In case it helps here are my host descriptor and attempted context 
fragments (I've tried lots of variants), basically manager and live work 
and so do the war files in D:\workspaces\blah\webapps, but not the 
context fragment D:\workspaces\blah\webapps\live2.xml)

(and I have tried dropping the live2.xml fragment into the localhost 
webapps directory, and that doesn't seem to work either).

   -------------------------------
server.xml (fragment)

<Host name="whatever.local" appBase="D:\workspaces\blah\webapps"
        unpackWARs="true" autoDeploy="true"
        xmlValidation="false" xmlNamespaceAware="false">
          <Context
             docBase="C:/Program Files/Apache Software Foundation/Tomcat 
5.5/server/webapps/manager"
             path="/manager"
             privileged="true"
             debug="0"
             />
           <Context
             docBase="D:/workspaces/blah/web"
             path="/live"
             antiResourceLocking="true"
             antiJARLocking="true"
             reloadable="false"
             />
   </Host>

   -------------------------------

D:\workspaces\blah\webapps\live2.xml

<Context
             docBase="D:/workspaces/blah/web"
             antiResourceLocking="true"
             antiJARLocking="true"
             reloadable="false"
             />

PS - this isn't just an auto-deploy problem - it won't deploy the 
live2.xml even on tomcat restart.

Many thanks

Tim



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


Re: help with context fragments (+virtual hosts) under windows

Posted by Vanessa Campos <dk...@yahoo.com>.
Tim,

I got the same problem once.
I found out that you have to put the context files under
${catalina-home}/conf/{engine-name}/{hostname}

It worked for me and I got all the contexts working fine.
I found it on:
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

Hope it helps you.

--- Tim Diggins <su...@red56.co.uk> escreveu:

> Hi -
> 
> I've never used context fragments to deploy before (have either put
> 
> context fragments into the server.xml, old tomcat4 style, or have
> used 
> web/ant interface for deployment, or just dropped wars into
> webapps).
> 
> so I'm now trying to use the context fragment method and have been 
> tearing my hair out. (nothing deploys). I've reverted to bunging
> the 
> contexts into the server.xml, cause I can't make it work, but would
> like to.
> 
> 
> This occurs on my development machine. here are the critical
> factors:
> * tomcat 5.5.15
> * window xp (my development machine)
> * java 1.5 p6
> * tomcat virtual hosts (set up in server.xml) with autoDeploy=True
> 
> I'm wondering if this is a bug with some combination of (windows + 
> virtualhosting + context fragments), but haven't seen any
> discussion of 
> this via google, or via tomcat bugzilla.
> Or maybe I'm just doing something stupid that's staring me in the
> face.
> 
> 
> In case it helps here are my host descriptor and attempted context 
> fragments (I've tried lots of variants), basically manager and live
> work 
> and so do the war files in D:\workspaces\blah\webapps, but not the 
> context fragment D:\workspaces\blah\webapps\live2.xml)
> 
> (and I have tried dropping the live2.xml fragment into the
> localhost 
> webapps directory, and that doesn't seem to work either).
> 
>    -------------------------------
> server.xml (fragment)
> 
> <Host name="whatever.local" appBase="D:\workspaces\blah\webapps"
>         unpackWARs="true" autoDeploy="true"
>         xmlValidation="false" xmlNamespaceAware="false">
>           <Context
>              docBase="C:/Program Files/Apache Software
> Foundation/Tomcat 
> 5.5/server/webapps/manager"
>              path="/manager"
>              privileged="true"
>              debug="0"
>              />
>            <Context
>              docBase="D:/workspaces/blah/web"
>              path="/live"
>              antiResourceLocking="true"
>              antiJARLocking="true"
>              reloadable="false"
>              />
>    </Host>
> 
>    -------------------------------
> 
> D:\workspaces\blah\webapps\live2.xml
> 
> <Context
>              docBase="D:/workspaces/blah/web"
>              antiResourceLocking="true"
>              antiJARLocking="true"
>              reloadable="false"
>              />
> 
> PS - this isn't just an auto-deploy problem - it won't deploy the 
> live2.xml even on tomcat restart.
> 
> Many thanks
> 
> Tim
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 


Vanessa Campos
dkaths@yahoo.com
ICQ 35381281

"Efetivamente, para o homem, enquanto homem, nada tem valor a menos que ele possa executa-lo com entusiasmo" Max Weber


	



	
		
_______________________________________________________ 
Yahoo! doce lar. Faça do Yahoo! sua homepage. 
http://br.yahoo.com/homepageset.html 


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