How can I get remote server catalina.base path like we do for local server ?
String catalinaBase = System.getProperty("catalina.base");
How can I get remote server catalina.base path like we do for local server ?
String catalinaBase = System.getProperty("catalina.base");
It will depend on your tomcat installation. System.getProperty()
will return values from system properties/environment variables. If your tomcat installation has set CATALINA_HOME then you can use that. Look at this Tomcat installation
If you are trying this on a server you visit this Getting tomcat's installation directory using java
I'd advise you not to use container specific properties but to specify your own system property and start tomcat (or any other servlet container) with it:
-Dconfig.dir=/path/to/config
System.getProperty("config.dir");