I am trying to reload a Tomcat6 web application (for example the Tomcat Documentation) via Curl.
I have tried it with:
curl.exe --user username:password http://myserver:8080/manager/list/stop?path=/docs
This doesn't work (Error 404).
I recorded the request with live HTTP headers. If I use the replay functionality it does work.
Any hints?
It's just a typo. Change manager/list/stop
to manager/stop
in the url.
curl.exe --user user:pass http://myserver:8080/manager/text/stop?path=/docs
It stops the application. If you want to restart you need the reload
parameter:
curl.exe --user user:pass http://myserver:8080/manager/reload?path=/docs
Note: Tomcat 7 uses different management urls.
References: