tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chris derham <>
Subject Re: Running Tomcat as service - is it possible to make "tomcat7.exe" run a batch file each time it starts?
Date Mon, 07 Mar 2011 10:22:27 GMT
> I run Groovy to make some machine-specific replacements in some files
> according to properties file which can be configured prior to starting
> Tomcat. We have Artifactory and Jenkins deployed to Tomcat. This property
> file contains various configurations to them and Groovy script, started
> from
> "catalina.bat", reads and makes replacements in Tomcat config (one of
> properties is "port #"), host name (one of properties is "localhost" which
> should be replaced by full host name with "InetAddress.
> localHost .
> canonicalHostName "), etc. So that's the code, to run some Groovy script
> before Tomcat starts the applications.

To sum up, each time your service starts, you dynamically configure tomcat
for your environment. What do you gain by dynamically configuring tomcat at
each startup?

Couldn't you just script the dynamic configuration to occur once manually.
Then you could just run tomcat as a service normally? Then when/If you
update tomcat, you could run the script to create the configuration again?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message