我想就像这个例子https://stackoverflow.com/a/4144674/758661通过ANT
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();
部署战争,而是得到一个403错误部署到Tomcat:
Server returned HTTP response code: 403 for URL:
http://localhost:8080/manager/text/deploy?path=%2Fupdater
我认为这是因为“/”已替换为“%2F”(密码和用户名像在tomcat-users.xml中)
如何防止将“/”替换为“%2F”?还是其他想法?谢谢。
不幸的是,这并没有解决我的问题。 – ForeverSmiling