File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes deploying in tomcat 6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "deploying in tomcat 6" Watch "deploying in tomcat 6" New topic
Author

deploying in tomcat 6

Suma Rangaraj
Ranch Hand

Joined: Feb 02, 2005
Posts: 50
Hello,
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!
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

That should work.
What's happening?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Suma Rangaraj
Ranch Hand

Joined: Feb 02, 2005
Posts: 50
Thanks for your response.

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.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

OK, I just checked the current documentation and it looks the same:


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.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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)
Suma Rangaraj
Ranch Hand

Joined: Feb 02, 2005
Posts: 50
Thanks for you reply Ben. I din't think I could create the directories on my own. will try that!
 
Consider Paul's rocket mass heater.
 
subject: deploying in tomcat 6