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.