> > 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. > > http://download.oracle.com/javase/6/docs/api/java/net/InetAddress.html#getLocalHost() > localHost . > > http://download.oracle.com/javase/6/docs/api/java/net/InetAddress.html#getCanonicalHostName() > 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? Chris