cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mplanchart
Level 5

Starting and Stopping Tomcat ...

Hi,

I need to stop Tomcat in order to install a web application WAR file and then start it up again.

What well-proven technique is out there?

I greatly appreciate the feedback!

Thanks
Labels (1)
0 Kudos
(4) Replies
Eyal_Goren
Level 6

Best to my knowledge, there is no standard way of stopping tomcat, just killing the process.

But- perhaps in latest versions it was changed...
0 Kudos
mplanchart
Level 5

How can I exectue a .bat file???

Wouldn't this be a way of restarting Tomcat, by running a batch file on the target windows machine?

This is only necessary if Tomcat's autodeploy attribute is set to false.

Thanks
0 Kudos
davbrown2
Level 4

If tomcat is running as a Windows service (e.g. you used "service.bat" to install it as a Windows service), you can either:

* invoke NET START and NET STOP commands to start and stop the service.

* Can you use VBScript with MultiPlatform? - the following is something I used with an MSI installer, but I suspect that it could be modified to be invoked from ISMP (you would need to get the service name from something other than Session.Property..)

Dim objShell
dim sServiceName


Function StartService()

sServiceName = Session.Property("SERVICENAME")

Set objShell=CreateObject("Shell.Application")

If objShell.ServiceStart(sServiceName, FALSE) Then
StartService = True
Else
StartService = False
End If

End Function


Function StopService()

sServiceName = Session.Property("SERVICENAME")

Set objShell=CreateObject("Shell.Application")

If objShell.ServiceStop(sServiceName, FALSE) Then
StopService = True
Else
StopService = False
End If

End Function
0 Kudos
Christopher_Pai
Level 16

I think the point is multiplatform might not be windows so no SCM and no scripting host.
0 Kudos