Using CURL to manage Tomcat

The other day I and a few of my colleges were talking about a easy way to deploy and undeploy war files from the command line like you could through the Tomcat Web Application Manager portal and being on a python kick, I started writing it in python. After an hour or two I realized that I had made this way more complex then I need to.  I had been reading theApache Tomcat 6.0 Manager App HOW-TO and I was using curl to test all the commands from localhost.

shell> curl –anyauth -u admin:password http://localhost:8080/manager/start?path=/myapp

So now after slapping myself in forehead and saying “duh!”. I decided I could write this as shell script and have it knock out in 20 minutes.

So here what I came up with



Leave a Reply