How to get tomcat installtion path, java path n documents path in a servlet

may someone help me get the folder and pathname for tomcat, java path and library path and also the pathname where the jsp documents are stored.

Thanks in advance

null

[186 byte] By [kagaraa] at [2007-11-27 11:13:00]
# 1

Have a look at System.getEnv(String) and System.getProperties();

String tomcatHome = System.getEnv("CATALINA_HOME");

Properties props = System.getProperties();

Enumeration<Object> keys = props.keys();

while(keys.hasMoreElements())

{

String key = (String) keys.nextElement();

String prop = System.getProperty(key);

System.out.println(key +" : " + prop);

}

yorkroada at 2007-7-29 13:58:09 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...