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 CATALINA_BASE question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "CATALINA_BASE question" Watch "CATALINA_BASE question" New topic
Author

CATALINA_BASE question

David Duran
Ranch Hand

Joined: Feb 11, 2002
Posts: 122
Tomcat Version: 5.0.19
I want to be able to keep my $CATALINA_HOME/conf and $CATALINA_HOME/webapps directory separate from the rest of the $CATALINA_HOME stuff. Is the easiest (and safest) way to do this by moving them to their new location and setting the ENV var CATALINA_BASE to point to their new location?

I ran a quick test like that on my local machine and it seemed to work. The only thing that caught my attention was that Tomcat was trying to look for the admin and manager webapps under server/webapps relative to $CATALINA_BASE, not $CATALINA_HOME. So I got these exceptions but was able to get rid of them by moving $CATALINA_HOME/server/webapps to $CATALINA_BASE/server/webapps.
Might I add that I'm not using the admin and manager webapps, so I'm wondering if I could ignore the errors altogether.
I just don't know if that's safe to do that. Any insights? Thanks.
[ March 11, 2004: Message edited by: David Duran ]
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16222
    
  21

First, check to make sure that you understand the difference between CATALINA_HOME and TOMCAT_HOME. You may simply need to point them to different locations.
However, the RPM installation of Tomcat does a different approach, which sounds like what you wanted to do.
Specifically, RPM Tomcat understands the strictures of the LFS standard, which say that executables should go in bin directories, config should go under /etc, work files should go under /var and logfiles go in /var/log.
To honor this useful convention, but still have things where Tomcat can find them, the RPM install creates a set of softlinks. Thus:
ln -s /etc/tomcat4/conf $TOMCAT_HOME/conf
ln -s /var/log/tomcat4 $TOMCAT_HOME/logs
and so forth.
Works very well, and makes the system much more manageable!


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: CATALINA_BASE question