cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Pilgrim

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
Highlighted
Pilgrim

Tomcat

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
Highlighted
Pilgrim

How can I execute a .bat file???

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
Highlighted
Pilgrim

Re: Starting and Stopping Tomcat ...

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
Highlighted

Re: Starting and Stopping Tomcat ...

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