This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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


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 ]
 
Have you checked out Aspose?
 
subject: Getting catalina home value from within a java class
 
It's not a secret anymore!