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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to