I want to get tomcat’s installation directory in my computer using java. I tried using :
System.getProperty("catalina.base");
and
System.getProperty("catalina.home");
But both methods return null as the answer. I tried it with System.getProperty("java.home"); and it correctly returns the java path.
Any ideas as to what the problem is? Thanks
Try installing this JSP and passing various values for the “property” parameter:
Maybe you can find a pattern to which property values return null.