How to get the Tomcat home directory in Java
Published: July 14, 2009 , Updated: July 14, 2009 , Author: mkyong
Q : Is there a function in Java to retrieve the Tomcat (Catalina) home directory?
A : Yes, Tomcat home directory or Catalina directory is stored at the Java System Property environment. If the Java web application is deployed into Tomcat web server, we can get the Tomcat directory with the following command
System.getProperty("catalina.base");
Any Java questions or problems? please post at this JavaNullPointer.com forum, see you there ~