'Tomcat deploy context root via commandline

How can I deploy my war file at / via commandline? The following does not work:

curl -X PUT --upload-file ROOT.war "http://localhost:8080/manager/text/deploy?path=/" -u 'admin:password'

It insteads gets deployed at /ROOT.war.

Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source