Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat Restart Programatically?

 
John Vergis
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have a requirement where I have to Restart my Tomcat5 Server, programatically, Could ne1 help me out in letting me know the appropriate API to make use of, to achieve this.

I don't want to reload/redeploy the webapp, but the Tomcat Server itself.

Thanks In Advance
John
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Basically you just have to execute the startup.bat batch file. This can be done with one of the java.lang.Runtime exec methods - be sure to consume the stdout and stderr streams that result.

"ne1" ??
Bill
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic