Tomcat clean shutdown plugin idea

I want to create a plugin that stops Tomcat cleanly when you click Stop in the run window, rather than just killing the process - my web application has components that need to be closed properly.

The plugin would simply open a connection to localhost:8005 and write SHUTDOWN, instructing tomcat to stop - the proper method of closing Tomcat.

I've had a look at the docs and I could build a button relatively simply on the main toolbar. But i'd like to make it better by either putting the button in the run window (so i remember to press it!), or even better intercepting the Stop action in the run window and calling my own Stop routine.

Is there a way to add buttons to the Run window? Is there a way to check to see if there are any Tomcat web applications configured?

Thanks in advance


Please sign in to leave a comment.