Is possible from a servlet to know the absolute path in which Tomcat 4.1 is installed

Alessandro A. Garbagnati

Yes, there is a way, but first you must know that this solution is not portable, since is for Tomcat only.

Both $CATALINA_HOME and $CATALINA_BASE, in addition to other information, are passed to Tomcat through the command line, as a "-D" parameters.
This means that they became System Properties, so you can get them by simply using:
System.getProperty("catalina.home") for $CATALINA_HOME
System.getProperty("catalina.base") for $CATALINA_BASE

On Tomcat 3.x, you should be able to use the same logic, but the name of the property is "tomcat.home"