File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

shutdown/start tomcat ?

 
jay lai
Ranch Hand
Posts: 180
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2187
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you want to do this? Please explain.
 
jay lai
Ranch Hand
Posts: 180
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2187
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic