Tomcat管理账号设置

编辑tomcat_home/conf/tomcat-users.xml

tomcat5.5.x/6.0.x:

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

 

 

tomcat7.0.X

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

 

 

如果hudson或者jenkins与tomcat7.X使用,则需要再增加一个角色,负责会提示找不到管理页面,如下:

<role rolename="manager-gui"/>  
<role rolename="admin-gui"/>  
<role rolename="manager-script"/>   
<user username="admin" password="admin" roles="manager-gui,admin-gui,manager-script"/>

 

你可能感兴趣的:(tomcat,xml)