pavan
pavan

Reputation: 791

Print tomcat version and path

I have a requirement to print the base dirctory of tomcat in which it is installed using java. my tomcat is installed in c:\apache-tomcat\.

In other words I want to print the catalina.home directorty using Java. System.out.println("print tomcat directory");

Upvotes: -1

Views: 1416

Answers (2)

Maurice Perry
Maurice Perry

Reputation: 32831

System.out.println(System.getProperty("catalina.home"));

Upvotes: 3

KV Prajapati
KV Prajapati

Reputation: 94645

You may get server info using this url - http://localhost:8080/manager/text/serverinfo command - Manager Commands..

Upvotes: 0

Related Questions