tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject RE: Separation of CATALINA_HOME and CATALINA_BASE
Date Mon, 03 Nov 2014 21:12:14 GMT
Even Tomcat newbies have to do real work that will find its way to a real server. 

Either of the benefits you described as a) and b) mean CATALINA_HOME and CATALINA_BASE need
to be separate on a real server.

I would rather get it straight from the outset rather than mess about with a configuration
that is going nowhere.

NetBeans separates out CATALINA_HOME and CATALINA_BASE, either automatically making its own
decisions about the content of CATALINA_BASE or manually by allowing you to specify your own
hand crafted directory.

I just made the switch from letting NetBeans populate CATALINA_BASE, to doing it myself. Naturally
I want to avoid having the same files appear in both directories so I went for minimal content.

How much easier it would be if the Tomcat distribution had the correct separation build in.


-----Original Message-----
From: Neven Cvetkovic [] 
Sent: 03 November 2014 20:22
To: Tomcat Users List
Subject: Re: Separation of CATALINA_HOME and CATALINA_BASE


On Mon, Nov 3, 2014 at 2:38 PM, <> wrote:

> On the subject of "Newbie-friendly", I think Tomcat would be a whole 
> lot more friendly if CATALINA_HOME and CATALINA_BASE were always 
> totally separate with a minimum of overlap.
Why is that?

I would argue current setup is very simple and "newbie-friendly". Most newbies are going to
have a single-instance tomcat running, even developers in their IDEs (Eclipse, NetBeans, IntelliJ,
etc...) would probably start with a single Tomcat instance.

You want your CATALINA_HOME = CATALINA_BASE in the "newbie" situation.
Actually you don't even want to advertise the difference to the "newbies".
You probably shouldn't even configure CATALINA_HOME/CATALINA_BASE environment variables, but
let the scripts infer from where you are running them.

Now, once one graduates pass the "newbie-friendly" - one can start looking when CATALINA_HOME
!= CATALINA_BASE is useful. Here are some ideas, why you would maybe want to separate out

a) when you want to make your Tomcat upgrades easier over time, so you just upgrade your CATALINA_HOME
each time and you keep your existing CATALINA_BASE (instance configuration) directory.

b) multi-instance environment, when you have multiple Tomcat instances running on the same
machine, and you are "sick-and-tired" of copying entire tomcat directory for each instance
and do the upgrades for each instance individually

Other than that, I don't see another reason to have CATALINA_HOME and CATALINA_BASE be any

> Although I used Tomcat quite a lot years ago I still consider myself a 
> Tomcat Newbie, mostly because configuration always took days or weeks 
> longer than is reasonable. Now I'm back to Tomcat after years of 
> having it easy using GlassFish. The files might be different now but 
> the grief with configuration is still the same.
> I've been through numerous configurations with various versions of 
> Tomcat
> 7 and 8 the furthest I've got is getting a database connection to 
> work. Now having created a minimal CATALINA_BASE I've jumped a few 
> steps back and it won't start.

Exactly my point earlier Vince. You ignore setting up CATALINA_HOME/CATALINA_BASE, you let
the scripts infer that from where it is being started. And then you just configure your datasource
either at the <GlobalNamingResources> level (e.g at conf/server.xml) or at the <Context>
level (e.g. at conf/Catalina/localhost/myapp.xml).

> I am sure many of the problems would evaporate if only there were 
> built in and permanent clarity over the separation between 
> Yes, I've read RUNNING.TXT and I'm left wondering why do I have a 
> catalina class not found if all the tomcat jar files are in 
> Using CATALINA_BASE:   "C:\tomcat8catalina_base"
> Using CATALINA_HOME:   "C:\tomcat809"
> Using CATALINA_TMPDIR: "C:\tomcat8catalina_base\temp"
> Using JRE_HOME:        "C:\jdk1.7.0_55"
>  "C:\tomcat809\bin\bootstrap.jar;C:\tomcat8catalina_base\bin\tomcat-juli.jar"
> Listening for transport dt_shmem at address: tomcat_shared_memory_id
> 03-Nov-2014 17:45:50.410 SEVERE [main] 
> org.apache.tomcat.util.digester.Digester.startElement Begin event 
> threw exception
>  java.lang.ClassNotFoundException:
> org.apache.catalina.startup.VersionLoggerListener
> All these experiments are done running Tomcat under NetBeans so 
> perhaps part of my issue is with NetBeans. The CLASSPATH shown above 
> is a bit on the short side, is it meant to be so short ?

If you are running Tomcat instance in IDE, why do you bother separating out CATALINA_BASE
and CATALINA_HOME? Default unzip and play setup work nicely in Eclipse and IntelliJ. I have
not played with NetBeans as much, but I am sure it is easy out-of-box setup.

Hope that helps!

View raw message