Showing posts with label tomcat. Show all posts
Showing posts with label tomcat. Show all posts

Tomcat as a Windows Service

When an application is ready to be deployed/installed it is often useful to run it as a service rather than directly from console. Tomcat provides some utilz which make it easier.

First step is to install new service. Existing service.bat script can be used:
service.bat install service_name

In order to configure existing service use Tomcat7w GUI application:
tomcat7w.exe //ES//service_name

Apart for service name and description settings you can also setup additional variables, configure memory settings and set Java VM parameters such as for example size of the permanent generation:

To monitor a service run:
tomcat7w.exe //MS//service_name
which will put an icon in the system tray

Another useful tomcat application is Tomcat7 itself. Some most popular usage below:
tomcat7.exe //RS//service_name - run the service
tomcat7.exe //SS//service_name - stop the service
tomcat7.exe //DS//service_name - delete service

You can also install Windows Administration Tools which contains "Services". Additional options can be set such as startup method (manual/ automatic) or recovery options (for example restart at first failure).