You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jake Alley <ja...@yahoo.com> on 2007/07/12 02:16:30 UTC

RE: Context information outside of server.xml

Thanks so much for everybody who replied to this.  I apologize for not replying/thanking sooner, but I have been trying to get this thing working.  Unfortunately I'm having only marginal success.  I'm thinking maybe there's something very fundamental that I'm not getting.

Here's where I'm at:

1. I can get the deployer to recognize myhostdir/ROOT/META-INF/context.xml.  It works ONLY with the default docBase of "" and ROOT.  Nothing else works for instance docBase="www" and directory myhostdir/www/META-INF/context.xml won't work.

2. Some things in context.xml work, others don't.  For instance a RemoteAddrValve works, but a Realm doesn't work.  

3. Even for the context in server.xml, the problem with #2 appears with docBase of "" and dir ROOT.  It goes away when I put docBase="www" and dir as www.

4. The Realm problem gives no log information.  It just acts like the realm doesn't exist.  

Perhaps the problem isn't with the Realm definition, but the implementation in WEB-INF/web.xml?  Does the ROOT context somehow make the app ignore web.xml?  I'm kind of lost at this point.  


Thanks.

Victor Huang <vi...@gameworkz.com> wrote: You need to specify docBase which is your application's doc root in
 element in ROOT.xml. e.g.


            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
    
crossContext="true">



You need to specify docBase which is your application's doc root in
<Context> element in ROOT.xml. e.g.

<Context debug="0" docBase="www" reloadable="true" crossContext="true/>
 

Regards,
Victor

 
-----Original Message-----
From: Jake Alley [mailto:jalley1231@yahoo.com] 
Sent: Thursday, June 28, 2007 10:10 AM
To: users@tomcat.apache.org
Subject: Context information outside of server.xml

I'm trying to rework my server.xml file so that the context info can be
reloaded without restarting the entire server.  As far as I can tell
 this
involves putting the context information in a file outside of
 server.xml.
I've read that META-INF/context.xml only works with WAR files, and I
 don't
use those.  I'm puting the info in conf/Catalina/mydomain/ROOT.xml.  It
doesn't seem to work.

For instance the following:

In conf/server.xml

<Host name="test1.mydomain.com"  appBase="/home/myhome/sites/test1"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
    <Context debug="1" path="" docBase ="www" reloadable="true"
crossContext="true">
</Context>

In conf/Catalina/test1.mydomain.com/ROOT.xml

<Context>
<Valve className="org.apache.catalina.valves.AccessLogValve"
    directory="/home/myhome/sites/test1/logs" prefix="test1."
 suffix=".log"
    pattern="common"/>
</Context>

I know this doesn't work because the logs don't get updated when in
ROOT.xml, but do when in server.xml.

Can anybody see what I'm doing wrong?  Thanks.

Can anybody see what I'm doing wrong?  Thanks.

 
       
---------------------------------
Looking for a deal? Find great prices on flights and hotels with Yahoo!
FareChase.



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



       
---------------------------------
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it on us.