I am upgrading from Tomcat 4 to Tomcat 6, and the concept of $CATALINA_HOME/conf/context.xml is confusing to me.
If we want to have multiple web applications running on a server, how can we list these in the $CATALINA_HOME/conf/context.xml file? Every time I try and put multiple context entries in this file I get a parse error on startup. Are we only allowed to have one context entry in this file?
If so, why would anyone ever use this as opposed to putting the context.xml into META-INF under webapps?
Thanks for the reply. Putting the context information in tomcat/conf/Catalina/localhost/[context-name].xml will work fine for me.
However I still don't understand the point of tomcat/conf/context.xml. Is this for "global" context information? Meaning you can't put docBase or path attributes in here...because the context entry applies to all contexts?
I see. It says that the element information here will be shared by all web apps. I've never used it but I'm taking that to mean that this would be a place to put settings that will be common to all of them. The same way you can put common settings into the tomcat/conf/web.xml descriptor.
Joined: Oct 14, 2004
I'll be following your advice and putting the context information in tomcat/conf/Catalina/localhost/[context-name].xml