Meaningless Drivel is fun!*
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 Murach's Java Servlets and JSP this week in the Servlets 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: 15951
    
  19

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.
 
Don't get me started about those stupid light bulbs.
 
subject: CATALINA_BASE question
 
Similar Threads
Two JVMs under one Tomcat
batik SVG object under tomcat gets: Gtk-WARNING **: cannot open display:
Tomcat 5.5.15 configuring multiple instances
Can�t load html from Tomcat
Unable to get authentication and authorization working.