I would like to know how to run a shell script on Tomcat startup, that is when catalina.log prints "INFO: Server startup in xxx ms"
Thanks in advance, bye
I would like to know how to run a shell script on Tomcat startup, that is when catalina.log prints "INFO: Server startup in xxx ms"
Thanks in advance, bye
find tomcat startup script (in
/etc/init.d/
maybetomcat7
) and write call-to-your-script in appropriate place atstart
block.At Tomcat 7, you can accomplish that through a custom listener in the server.xml file at tomcat's configuration:
CustomEventHootListener.java:
You can see a functional example at https://github.com/Valemobi/tomcat-events-hook