I’m trying to deploy WAR like in this example https://stackoverflow.com/a/4144674/758661
DeployTask task = new DeployTask();
task.setUrl("http://localhost:8080/manager/text");
task.setUsername("tomcat");
task.setPassword("s3cret");
task.setPath("/updater");
task.setWar(warFile.getAbsolutePath());
task.execute();
But get an 403 error:
Server returned HTTP response code: 403 for URL:
http://localhost:8080/manager/text/deploy?path=%2Fupdater
I think it is because “/” has been replaced to “%2F” (password and username are like in tomcat-users.xml)
How can I prevent replacing “/” to “%2F”? Or any other ideas? Thx.
I solve it.
In Overview of Tomcat Server in Eclipse (right-click on server -> open) in “Server Locations” I had to choose the secons radio-button “Use Tomcat installation” (by default it set to first “Use workspace metadata”.
Because in default case Tomcat starts without the manager app wich needed in this case.