aspose file tools
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
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Reply 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: 380

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, IT, Software, Web Pages
Blog , LinkedIn
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56233
    
  13

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


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14491
    
    7

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: 380

thanks everyone for your inputs.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Do we need to set CATALINA_HOME AND CATAlINA_BASE explicitly ?
 
Similar Threads
Startup problem in Tomcat server
Error access denied
Multiple Instances of Tomcat
Unable to set the catalina_home
Tomcat Hangs during startup