天天看点

tomca的用户设置

在tomcat-users.xml中的<tomcat-users>节点添加角色和用户名,如

<?xml version='1.0' encoding='utf-8'?>

<tomcat-users>

<role rolename="tomcat"/>

<role rolename="role1"/>

<role rolename="manager"/>

<user username="tomcat" password="tomcat" roles="tomcat"/>

<user username="role1" password="tomcat" roles="role1"/>

<user username="both" password="tomcat" roles="tomcat,role1"/>

<user username="manager" password="manager" roles="manager"/>

</tomcat-users>