Skip to content

Instantly share code, notes, and snippets.

@pete911
Last active October 12, 2022 19:13
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 10 You must be signed in to fork a gist
  • Save pete911/6111816 to your computer and use it in GitHub Desktop.
Save pete911/6111816 to your computer and use it in GitHub Desktop.
tomcat - deploy war files using curl
# deploy under "path" context path
curl --upload-file appplication-0.1-1.war "http://tomcat:tomcat@localhost:8080/manager/deploy?path=/application-0.1-1
# undeploy
curl "http://tomcat:tomcat@localhost:8080/manager/undeploy?path=/application-0.1-1"
# ! tomcat7 uses /manager/text/undeploy and /manager/text/deploy paths
# tomcat6-admin (debian) or tomcat6-admin-webapps (rhel) has to be installed
# tomcat-users.xml has to be setup with user that has admin, manager and manager-script roles
@Lpker-2006
Copy link

what would happen if the path doesn't exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment