This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Five Lines of Code and have Christian Clausen on-line!
See this thread for details.
Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Tomcat Server Running Status

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi..,

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..
--------------------

Levi
SCJP 1.4
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Bill.
 
Vadivel Murugesan
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for Reply

yep you are right!!! i can get running status of Apache Tomcat Server By
conf/server.xml

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.

 
Are we home yet? Wait, did we forget the tiny ad?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic