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 To Detect Tomcat path from java application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "To Detect Tomcat path from java application" Watch "To Detect Tomcat path from java application" New topic
Author

To Detect Tomcat path from java application

Syed Saifuddin
Ranch Hand

Joined: Sep 01, 2003
Posts: 130
Hello

I want to make installer of my web application. For this I need to know where the Tomcat is installed (and either it is install or not) to drop the folder of my web application in the webapps folder of tomcat.

Any help or idea is appreciated

Thank You


Thank You & Best Regards,

Syed Saifuddin,
Senior Software Engineer

SAP Oracle AIX & Java Training
http://www.socialinet.com
ramprasad madathil
Ranch Hand

Joined: Jan 24, 2005
Posts: 489

That may not be possible.
Prompt the user to enter TOMCAT_HOME during install or enter the value in a properties files which your application reads from.

ram.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Depending on how they've installed it, you may have the CATALINA_HOME or CATALINA_BASE environment variables available.

Just knowing the location of the Tomcat installation, doesn't mean that you will know where to find the host directory. Tomcat can be configured in all kinds of ways. There is no guarantee that dropping a war file in the webapps directory will cause your app to be deployed unless you know that you're dealing with a default install.

I'm going to move this to the Apache Tomcat forum since it's more specific to Tomcat than to Servlets in general.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: To Detect Tomcat path from java application