tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Evgeny Goldin <>
Subject Re: Running Tomcat as service - is it possible to make "tomcat7.exe" run a batch file each time it starts?
Date Sun, 06 Mar 2011 22:41:13 GMT

billybob79 wrote:
>> Back when it was running through "startup.bat" we put some code in
> "catalina.bat" which is now ignored by "tomcat7.exe".
> What is it that you are trying to achieve? What does this "code" do? Maybe
> if you explain a little more, someone might have achieved the same thing
> already in a different way

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.

Right, I'll try "cmd.exe" as service target and then will run either
"catalina.bat" or "tomcat7.exe" from my batch. Btw, which one is better or
more correct to run here?
View this message in context:
Sent from the Tomcat - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message