I have an apparently simple situation: a running Tomcat 7.0.54 instance whose host is configured with autoDeploy=false
and unpackWars=true
and I want to deploy a new web application there without restarting the server.
From within the server machine I copied the webapp WAR file to the Tomcat appBase
directory (webapps/
), then from the HTML manager I can succesfully deploy it from the "Deploy directory or WAR file located on server" section by only filling the "Context path" form field and hitting "Deploy".
I'm now trying to do the same from the command line, and while commands such as:
curl -u admin:password1 http://localhost:8680/manager/text/list
and:
curl -u admin:password1 http://localhost:8680/manager/text/stop?path=/webapp
Both give OK - [...]
, I can't find any syntax for the /deploy
command that would succeed, any attempt results in the following error:
FAIL - Invalid context path null was specified
According to the manager docs, the following syntax should do it:
curl -u admin:password1 http://localhost:8680/manager/text/deploy?war=webapp.war
But it doesn't, and even adding a &path=/webapp
parameter doesn't yield a different result.
Permissions on the webapps/
folder are already right: as other webapps already deployed and running, everything belongs to root
.
What am I missing?
Best Answer
It turned out there were two issues:
&
was parsed as a job control and the command ran in the background, so I had to put the whole URL between quotes;The whole working syntax is: