You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dave Cherkassky <dc...@djinnsoft.com> on 2010/03/24 16:44:25 UTC
"/META-INF/context.xml" is being copied to "$CATALINA_HOME/conf/my_engine/my_app/ROOT.xml"
Dear Tomcat community:
Here's my setup:
- I am running Apache Tomcat/6.0.24.
- I am deploying the my applications 'exploded' -- i.e. NOT as a war file.
- each application is defined by a /META-INF/context.xml in the respective appBase directory.
- I have several virtual hosts:
<Service name="my_service">
<Connector protocol="AJP/1.3" port="8009" />
<Engine name="my_engine" defaultHost="proj-2-1">
<!-- Default host -->
<Host name="proj-2-1"
appBase="/home/webadmin/proj-2-1.djinnsoft.com" unpackWARs="false">
...
</Host>
<!-- UAT site -->
<Host name='hg.djinnsoft.com' unpackWARs='false'
appBase='/home/webadmin/hg.djinnsoft.com/appBase'
workDir='/home/webadmin/work/hg.djinnsoft.com'>
<Alias>hg.djinnsoft.com</Alias>
...
</Host>
<!-- QA site -->
<Host name='test-hg.djinnsoft.com' unpackWARs='false'
appBase='/home/webadmin/test-hg.djinnsoft.com/appBase'
workDir='/home/webadmin/work/test-hg.djinnsoft.com'>
<Alias>test-hg.djinnsoft.com</Alias>
...
</Host>
</Engine>
</Service>
Here'smy question/problem:
I've noticed that the /META-INF/context.xml files are being copied from the respective appBase directories to $CATALINA_HOME/conf/my_engine directory. For example:
# ls /opt/tomcat6/conf/my_engine/hg.djinnsoft.com/ROOT.xml
/opt/tomcat6/conf/my_engine/hg.djinnsoft.com/ROOT.xml
# ls /opt/tomcat6/conf/my_engine/test-hg.djinnsoft.com/ROOT.xml
/opt/tomcat6/conf/my_engine/test-hg.djinnsoft.com/ROOT.xml
This behaviour is unexpected for two reasons:
- I have another system, which is configured identically (for another client), except that the Tomcat version is 6.0.18. The older Tomcat version is not copying files like this.
- I can't find anything in the documentation that talks about copying the context.xml files for <Host> container (not to be confused with copying context.xml for the <Context> container, which might happen on occasion).
Is this a new bug? Did I do something wrong? Did the Tomcat behaviour change in an undocumented fashion?
Thanks,
--
Dave Cherkassky
VP of Software Development
DJiNN Software Inc.
416.504.1354
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: "/META-INF/context.xml" is being copied to "$CATALINA_HOME/conf/my_engine/my_app/ROOT.xml"
Posted by André Warnier <aw...@ice-sa.com>.
Dave Cherkassky wrote:
...
Just a note : in the setup you showed, most if not all <Alias> tags are
unnecessary, since they just duplicate the name you have in the <Host>
tag. You need an <Alias> tag only if you want to access the same virtual
host through different DNS names.
Like :
<Host name="www.company.com" ...>
<Alias>bigserver.company.com</Alias>
<Alias>sun03.company.com</Alias>
...
</Host>
Considering how java works, you'd probably be saving yourself a few
dozen object instances just by removing those <Alias> things..
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: "/META-INF/context.xml" is being copied to "$CATALINA_HOME/conf/my_engine/my_app/ROOT.xml"
Posted by Dave Cherkassky <dc...@djinnsoft.com>.
See below:
>> Is this a new bug?
> Why is it a bug?
>
Sorry, I was not implying anything :) I was just wondering why the behaviour changed.
>> Did the Tomcat behaviour change in an undocumented fashion?
> See notes for 6.0.19.
> http://tomcat.apache.org/tomcat-6.0-doc/changelog.html
>
Ah, this is a side effect of fixing issue https://issues.apache.org/bugzilla/show_bug.cgi?id=42747 right? Subtle! I wish that http://tomcat.apache.org/tomcat-6.0-doc/config/host.html has explained this -- would have saved a lot of time.
Anyhoo, it all makes sense now. Thanks for your help.
--
Dave Cherkassky
VP of Software Development
DJiNN Software Inc.
416.504.1354
>
>
> p
>
>
>> Thanks,
>> --
>> Dave Cherkassky
>> VP of Software Development
>> DJiNN Software Inc.
>> 416.504.1354
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: "/META-INF/context.xml" is being copied to "$CATALINA_HOME/conf/my_engine/my_app/ROOT.xml"
Posted by Pid <pi...@pidster.com>.
On 24/03/2010 15:44, Dave Cherkassky wrote:
> Dear Tomcat community:
>
> Here's my setup:
> - I am running Apache Tomcat/6.0.24.
> - I am deploying the my applications 'exploded' -- i.e. NOT as a war file.
> - each application is defined by a /META-INF/context.xml in the
> respective appBase directory.
> - I have several virtual hosts:
> <Service name="my_service">
> <Connector protocol="AJP/1.3" port="8009" />
> <Engine name="my_engine" defaultHost="proj-2-1">
> <!-- Default host -->
> <Host name="proj-2-1"
> appBase="/home/webadmin/proj-2-1.djinnsoft.com" unpackWARs="false">
> ...
> </Host>
>
> <!-- UAT site -->
> <Host name='hg.djinnsoft.com' unpackWARs='false'
> appBase='/home/webadmin/hg.djinnsoft.com/appBase'
> workDir='/home/webadmin/work/hg.djinnsoft.com'>
> <Alias>hg.djinnsoft.com</Alias>
> ...
> </Host>
>
> <!-- QA site -->
> <Host name='test-hg.djinnsoft.com' unpackWARs='false'
> appBase='/home/webadmin/test-hg.djinnsoft.com/appBase'
> workDir='/home/webadmin/work/test-hg.djinnsoft.com'>
> <Alias>test-hg.djinnsoft.com</Alias>
> ...
> </Host>
> </Engine>
> </Service>
>
>
> Here'smy question/problem:
>
> I've noticed that the /META-INF/context.xml files are being copied from
> the respective appBase directories to $CATALINA_HOME/conf/my_engine
> directory. For example:
> # ls /opt/tomcat6/conf/my_engine/hg.djinnsoft.com/ROOT.xml
> /opt/tomcat6/conf/my_engine/hg.djinnsoft.com/ROOT.xml
> # ls /opt/tomcat6/conf/my_engine/test-hg.djinnsoft.com/ROOT.xml
> /opt/tomcat6/conf/my_engine/test-hg.djinnsoft.com/ROOT.xml
>
>
> This behaviour is unexpected for two reasons:
> - I have another system, which is configured identically (for another
> client), except that the Tomcat version is 6.0.18. The older Tomcat
> version is not copying files like this.
> - I can't find anything in the documentation that talks about copying
> the context.xml files for <Host> container (not to be confused with
> copying context.xml for the <Context> container, which might happen on
> occasion).
>
>
> Is this a new bug?
Why is it a bug?
> Did I do something wrong?
Nope.
> Did the Tomcat behaviour change in an undocumented fashion?
See notes for 6.0.19.
http://tomcat.apache.org/tomcat-6.0-doc/changelog.html
p
> Thanks,
> --
> Dave Cherkassky
> VP of Software Development
> DJiNN Software Inc.
> 416.504.1354
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org