I\'m writing a shell script to auto deploy/undeploy using the tomcat manager.
Following the instructions on http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.htm
The easiest way to deploy an app is to write an Ant script. The only other thing (apart from Ant) you will need is catalina-ant.jar to be present in the classpath.
Have a look at this chapter of the manual: http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html#Executing_Manager_Commands_With_Ant
The script does a similar thing: uses HTTP to deploy your .war to the manager app. You might even want to capture the packets to see the exact headers if you still want to use curl. I would not recommend curl though as I think Ant solution is more portable and error-prone (e.g what if they will change low level deployment API?).