File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Getting catalina home value from within a java class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Getting catalina home value from within a java class" Watch "Getting catalina home value from within a java class" New topic
Author

Getting catalina home value from within a java class

jaki jane
Greenhorn

Joined: Aug 04, 2008
Posts: 11
Is there a way to get the absolute path to tomcat home directory in a java program when CATALINA_HOME env variable is not set? I can probably use some class in org.apache.catalina but the jars are in different folders depending on the version of tomcat and I need the program to be version independent. I tried using the system property catalina.home but it returns a null. Also, I don't have any .bat/.sh files in my tomcat5 directory as I installed it as a service for Windows. Please help me here
[ September 23, 2008: Message edited by: jaki jane ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting catalina home value from within a java class