在javaEE项目中,需要将工程部署到远程服务器上,如果部署的频率比较高,手动部署的方式就比较麻烦,可以利用Ant工具实现快捷的部署。这篇博文详细介绍了ant配置的步骤(http://www.iyunv.com/GloriousOnion/archive/2012/12/18/2822817.html),但是在tomcat7以上不适用,需要修改配置,具体如下: 1.配置tomcat的用户角色
tomcat7中的用户角色有:
manager-gui — Access to the HTML interface.
manager-status — Access to the "Server Status" page only.
manager-script — Access to the tools-friendly plain text interface that isdescribed in this document, and to the "Server Status" page.
manager-jmx — Access to JMX proxy interface and to the "ServerStatus" page.
我们要用到的是manager-script,在tomcat-users.xml 中进行配置。加入以下代码: