aspose file tools*
The moose likes Tomcat and the fly likes shutdown/start tomcat  ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "shutdown/start tomcat  ?" Watch "shutdown/start tomcat  ?" New topic
Author

shutdown/start tomcat ?

jay lai
Ranch Hand

Joined: Apr 04, 2002
Posts: 180
Hi
I have a web application run on tomcat 6 on window xp server. So I want to have a mechanism to shutdown/start tomcat remotely using Java. I don't have access to this machine, just know the ip and where the tomcat/bin directory are installed.
Anyone know how to do this or have some hints. please help
Regards
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Why do you want to do this? Please explain.
jay lai
Ranch Hand

Joined: Apr 04, 2002
Posts: 180
The reason I want to do this way, b/c the tomcat server sometimes down and nobody know about it. The app is dead in water, therefore we want to have a mechanism to start/stop tomcat server remotely without a physical person sit at the machine to do this job.

thanks
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
What does "b/c" mean? Tomcat is a name and should be capitalized. "app" is not a real word.

If you actually own the machine that is hosting an instance of Tomcat, you should be able to deploy a Web service on the machine that will start and stop the server. You can then access the Web service to do these tasks.

However, if your web application is randomly shutting down on its own, you should be concerned about fixing these problems rather than worrying about how to restart the server remotely.
[ July 10, 2008: Message edited by: James Clark ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61648
    
  67

The BigDecimal Bear is correct, please use real words when posting to the forums. Abbreviations such as "b/c" in place of whatever it's supposed to mean (I have no clue) only serve to make your posts more difficult to read and less likely to generate useful responses.

Please read this for more information.

thanks,
bear
JavaRanch sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61648
    
  67

Why not just ssh to the machine?

My web apps are hosted in Buffalo, New York. That's a far cry from Texas! (1,355 miles to be exact. Glad that I don't have to drive that every time I need to access my applications!)
[ July 10, 2008: Message edited by: Bear Bibeault ]
 
 
subject: shutdown/start tomcat ?