当我试图在tomcat 7.0.30中使用ant任务卸载一个webapp时,它给我的信息是:
失败-尝试通过GET请求使用命令/undeploy,但需要POST
但我找不到解决这个问题的办法。
我的蚂蚁任务错了吗?还是tomcat配置?
我的蚂蚁任务是。
<path id="catalina-ant-classpath">
<fileset dir="${tomcat.base.dir}/lib">
<include name="catalina-ant.jar"/>
<include name="tomcat-coyote.jar"/>
<include name="tomcat-util.jar"/>
</fileset>
<fileset dir="${tomcat.base.dir}/bin">
<include name="tomcat-juli.jar"/>
</fileset>
</path>
<taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask" classpathref="catalina-ant-classpath"/>
<target name="undeploy" description="undeploy from tomcat">
<undeploy
url="http://localhost:8080/manager/html"
username="admin"
password="password"
path="/mywebapp"
/>
</target>我的tomcat-users.xml是..。
<user username="admin" password="password" roles="manager-gui, manager-jmx, manager-status"/>发布于 2012-09-25 15:40:49
尝试使用此url而不是以“html”结尾的url:
http://localhost:8080/manager/text您还可能需要在tomcat-users.xml中向用户添加这些角色:
manager-script, admin-scripthttps://stackoverflow.com/questions/12585517
复制相似问题