Tomcat 7 ant自动部署

xml 写法和tomcat 6 一样

只是tomcat 7 有些地方和tomcat 不一样

具体如下

1.copy %tomcathome%\bin\tomcat-juli.jar to %tomcathome%

2.Configuation tomcat-user.xml as below

<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
  <role rolename="manager-gui"/>
  <role rolename="admin-gui"/>
  <role rolename="manager-script"/>
  <role rolename="tomcat"/>
  <role rolename="admin"/>
  <role rolename="role1"/>
  <user username="both" password="tomcat" roles="tomcat,role1"/>
  <user username="tomcat" password="tomcat" roles="tomcat"/>
  <user username="admin" password="admin" roles="manager-script,manager-gui,admin-gui"/>
  <user username="role1" password="tomcat" roles="role1"/>


</tomcat-users>
3.Modify the attribute of url=http://localhost:8080/manager/text

猜你喜欢

转载自jerome-wang.iteye.com/blog/1622967