You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Hollerman Geralyn M <gm...@louisiana.edu> on 2005/05/05 21:59:03 UTC
context.xml created by Ant not discovered by Tomcat
I am attempting to get some JDBC parameters passed from Ant to a Tomcat
<context>.xml file. The idea is for an Ant target to create a file called
context.xml and place it in <catalina_home>/webapps/<my webapp>/META-INF/ - and
THERE IS NO .war FILE INVOLVED. Upon startup, Tomcat will discover the file in
that /META-INF directory and copy/move it to <catalina_home>/conf/<my
engine>/<my host>/, where the JDBC parameters in it will then be used for the
application.
However, this doesn't work. I have tried both Tomcat 5.0.28 and 5.5.9. I have
read over the docs, and from them, it appears that what I want to do is correct
in theory. I read thru the archives of this list, and I found a message
seemingly asking the same things I am - as in, does context.xml have to be in a
.war and where should it be placed for a web application; the response to this
was: "The META-INF/context.xml file is only consulted if inside a .war.
Otherwise, put the config.xml file in the webapps directory itself (if
autodeploy is on, which is the default), or whatever directory you designate as
the Host's appBase(tomcat 4), or the /conf/[engine name]/[host name] directory
(tomcat 5)."
I have moved context.xml to all the various places described above and
restarted, all with no success. Same with renaming it - it doesn't appear to
matter whether the file is called context.xml or <my webapp>.xml.
So, IS there a way to do what I'm trying to do?
Thanks!
--
Lynn Hollerman.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: context.xml created by Ant not discovered by Tomcat
Posted by Matt Galvin <ma...@gmail.com>.
> So, IS there a way to do what I'm trying to do?
Yes, there is, I usually put them in:
$CATALINA_HOME/conf/Catalina/localhost/myapp.xml
Could you post the contents of your context file? Maybe something
needs to be tweak possibly.
Matt
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org