Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to check tomcat is running or not from a batch file

 
seetharaman jayaraman
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
i have 2 servlets both starts tomcat. but, when the 2nd servlet is trying to start, it gets error (because it is already started by 1st servlet). So, here i need to check whether tomcat is running or not from a DOS batch file

Ex:
here the result of 'echo' command is stored in variable a. but it failed when i tried like this:


please do help
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have 2 servlets both starts tomcat.


What does that mean?? Tomcat is a container for servlets, servlets dont start the container they live in!

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic