wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Do we need to set CATALINA_HOME AND CATAlINA_BASE explicitly ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Do we need to set CATALINA_HOME AND CATAlINA_BASE explicitly ?" Watch "Do we need to set CATALINA_HOME AND CATAlINA_BASE explicitly ?" New topic
Author

Do we need to set CATALINA_HOME AND CATAlINA_BASE explicitly ?

naveen yadav
Ranch Hand

Joined: Oct 23, 2011
Posts: 384

hi ranchers,

after installing Tomcat , do CATALINA_HOME AND CATAlINA_BASE has to be set explicitly as environment variable?

In tomcat properties under java options these variables has been set by default.

-Dcatalina.home=C:\Program Files (x86)\Apache Software Foundation\Tomcat 6.0
-Dcatalina.base=C:\Program Files (x86)\Apache Software Foundation\Tomcat 6.0
-Djava.endorsed.dirs=C:\Program Files (x86)\Apache Software Foundation\Tomcat 6.0\endorsed
-Djava.io.tmpdir=C:\Program Files (x86)\Apache Software Foundation\Tomcat 6.0\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=C:\Program Files (x86)\Apache Software Foundation\Tomcat 6.0\conf\logging.properties




Do have to set them explicitly ?



One more thing if i had to reset the catalina.base or set more than one catalina.base. can it done be here ?
Pablo Abbate
Ranch Hand

Joined: Aug 06, 2012
Posts: 30

I'm remembering that Tomcat has a setEnv.sh or setEnv.bat .. which set up the environment variables according the installation path. Please take a look into those files ...


Nissi Group, Posicionamiento Web, Desarrollo de Software, DiseƱo Web
Blog , LinkedIn
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

No. Tomcat will set those. All you need to set is JAVA_HOME.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15641
    
  15

when you launch Tomcat using one of the scripts that starts the server, such as catalina.sh, the script will default CATALINA_HOME and CATALINA_BASE to point to the parent of the directory containing the script. You do need JAVA_HOME, though - it must point to a JDK for Tomcat6 or lower. I can't remember if they managed to finally remove this restriction in Tomcat 7.

The only times you HAVE to set CATALINA_HOME and/or CATALINA_BASE are if you want to override the default values. Most commonly, you'd do that if you were using the same Tomcat binaries to run multiple instances of Tomcat.


Customer surveys are for companies who didn't pay proper attention to begin with.
naveen yadav
Ranch Hand

Joined: Oct 23, 2011
Posts: 384

thanks everyone for your inputs.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Do we need to set CATALINA_HOME AND CATAlINA_BASE explicitly ?
 
Similar Threads
Multiple Instances of Tomcat
Startup problem in Tomcat server
Unable to set the catalina_home
Error access denied
Tomcat Hangs during startup