1

Does System.getProperty("catalina.base") give only the Tomcat home, or does it also work on servers like GlassFish or WebSphere?

System.getProperty("catalina.base") gives me the following path:

C:\Tomcat 6.0
Paolo Moretti
  • 54,162
  • 23
  • 101
  • 92
vivekj011
  • 1,129
  • 3
  • 16
  • 23
  • 2
    What is it, the problem you *really* need to solve? You should reformulate the question as such or just ask a new question. – BalusC May 24 '11 at 15:35

2 Answers2

5

Only for tomcat. Catalina is a tomcat specific thing!

Catalina is basically the servlet container used by tomcat.

Suraj Chandran
  • 24,433
  • 12
  • 63
  • 94
  • Thanx for your answer. Is there any way to read property file from outside your web-application – vivekj011 May 24 '11 at 15:36
  • @Vivek: Ask that as a separate question. (Yes. But let's do this properly by SO rules.) – Donal Fellows May 24 '11 at 15:37
  • In linux many people set the CATALINA_HOME environment variable, so you could read it, but ofcourse thats not a gurantee. In any case, catalina base is just a property passed indicating the location of servlet ocntainer, so if you know wehre you are getting the jvm params, you could work from thereon – Suraj Chandran May 24 '11 at 15:38
  • Actually r8 now i m reading property file from Tomcat\conf directory using System.getProperty("catalina.base") There can be scenario where client may use any other server That is what my concern is..... – vivekj011 May 24 '11 at 15:39
2

In short, yes.

Catalina refers to the Tomcat Servlet Container, the module of the Tomcat Web Application Server that implements the Servlet and JSP Sun Microsystems Specification.

Other modules include Coyote, Jasper and Jasper 2.

The above applies to Tomcat 6. I don't know the details of the latest Tomcat release.

Koekiebox
  • 5,793
  • 14
  • 53
  • 88