Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

context.xml problem

Status
Not open for further replies.

oceandeep

IS-IT--Management
Jul 6, 2000
69
GR
Hi,

I am having problems of using context.xml, and I want to make a dynamic link to my packages. I am using tomcat-5.0.25, and from tomcat's document, it can be put under mypackage/META-INF/context.xml, whenever tomcat started, it will be copied to ~/tomcat/conf/[engine]/[host]/[package.xml], (is my assumption correct?) but it seems it can only work with war file, not the expanded directory! But we don't use war file to deploy our packages.
Can anybody here give me some suggestions on how to use the context.xml file.
Thanks a lot!
 
You say you are having problems using context.xml, but you don't say what your problems are! What is the problem?

And, what does making a dynamic link have to do with it? BTW, what's a "dynamic" link? Do you mean that you want your app's root to reside somewhere other than the webapps directory? If so, then you need to put a appname.xml file in ~/tomcat/conf/[engine]/[host]/. That file must contain a <Context> tag with the path attribute set to the actual location of your app's root directory. The Tomcat docs call this a "Context XML descriptor".

In deployer-howto, the Tomcat docs say "A web application which is programatically deployed with the deployer may include Tomcat specific deployment configuration, by including a Context configuration XML file in /META-INF/context.xml." This implies that this file is ignored if not deployed using the deployer. You should test it to find out.

I don't see anything in Tomcat's docs that says it will copy the context.xml file to ~/tomcat/conf/[engine]/[host]/[package.xml]. Again, why don't you test it and see what happens?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top