tomcat配置用户权限

1、vi /etc/tomcat6/tomcat-user.xml //系统安装目录
2、删除注释符

3、增加账号
Tomcat 6 的配置:

<tomcat-users>
  <role rolename="tomcat"/>  /权限
  <role rolename="role1"/>
  <role rolename="admin"/>
  <role rolename="manager"/>
  <user username="tomcat" password="tomcat" roles="tomcat"/>
  <user username="both" password="tomcat" roles="tomcat,role1"/>
  <user username="role1" password="tomcat" roles="role1"/>
  <user username="manager" password="tomcat" roles="manager"/>  /管理权限
  <user username="admin" password="tomcat" roles="admin"/>  /账户




tomcat-users>

Tomcat 7 的配置:

<tomcat-users>
<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="admin" password="admin" roles="admin-gui"/>
<user username="tomcat" password="tomcat" roles="manager-gui"/>
tomcat-users>

4、重启服务
service tomcat6 restart

你可能感兴趣的:(jsp)