I have upgraded from tomcat 5.5 to tomcat 6. I have an exploded web app to deploy. The way I was doing it before was by creating a myApp.xml file and place it in the conf\catalina\localhost directory and specifying the docbase in the myApp.xml.
Can some one tell me how to deploy exploded web app in tomcat 6? Thanks!
For Tomcat 6, unlike Tomcat 4.x, it is NOT recommended to place <Context> elements directly in the server.xml file. This is because it makes modifing the Context configuration more invasive since the main conf/server.xml file cannot be reloaded without restarting Tomcat.
Context elements may be explicitly defined:
* in the $CATALINA_HOME/conf/context.xml file: the Context element information will be loaded by all webapps
* in the $CATALINA_HOME/conf/[enginename]/[hostname]/context.xml.default file: the Context element information will be loaded by all webapps of that host
* in individual files (with a ".xml" extension) in the $CATALINA_HOME/conf/[enginename]/[hostname]/ directory. The name of the file (less the .xml) extension will be used as the context path. Multi-level context paths may be defined using #, e.g. context#path.xml. The default web application may be defined by using a file called ROOT.xml.
* if the previous file was not found for this application, in an individual file at /META-INF/context.xml inside the application files
* inside a Host element in the main conf/server.xml
So, I also grabbed a copy of Tomcat 6 and, you're correct those directories are not there. I created them myself and put a context fragment file in the usual place, and it worked.
Originally posted by Suma Rangaraj:
The thing is in latest tomcat 6, I do not find a conf\catalina\localhost directory. So, I am not sure what the settings are now.
NOTE: The path is case sensitive.
If you create the directories yourself, make sure that it's spelled:
conf\Catalina\localhost. (note the capital C)