This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Tomcat Server Running Status Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat Server Running Status" Watch "Tomcat Server Running Status" New topic

Tomcat Server Running Status

Vadivel Murugesan

Joined: Jul 19, 2008
Posts: 11

I want to get Application(Apache Server, MySQL Server...etc) Running Process Status using java(Any API).

I can use Runtime.exec("tasklist") to get Running Process Informations.
For tomcat Server the process name would be tomcat5.exe.
So i can easily match the string with running process to get application is running or not
But if i load tomcat server in Eclipse means the process name might javaw.exe in Tasklist.

So i can not use Runtime.exec("tasklist") for this case.

So Anybody can help me to solve this issue?

Thanks in Advance Dude..

SCJP 1.4

Levi<br />SCJP 1.4
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13018
You can talk directly to the Tomcat Manager application using simple GET urls and parsing the returned text.

See the manager-howto.html and html-manager-howto.html files in a typical tomcat docs installation. Manager does not come with the standard Tomcat install, you have to add it separately.

Vadivel Murugesan

Joined: Jul 19, 2008
Posts: 11
Thanks for Reply

yep you are right!!! i can get running status of Apache Tomcat Server By

But my problem is, i need to find status of any server(DB server, Appl Server or Web Servers ) which would given by User

By your reply, i have coded to find status of Tomcat by using server.xml, but it makes application dependency.. i need to develop application independent tool..

Could you help me for this case.

I agree. Here's the link:
subject: Tomcat Server Running Status
It's not a secret anymore!