tomcat 修改用户名和密码

进入tomcat目录下的

conf\tomcat-users.xml

 

假设我要添加管理员账号haha,密码为haha. 新xml如下:

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

<tomcat-users> <role rolename="tomcat"/>

<role rolename="role1"/>

<role rolename="manager"/>

<role rolename="admin"/>

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

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

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

<user username="haha" password="haha" roles="admin,manager"/>

</tomcat-users>

 

posted @ 2012-03-30 17:03  残星  阅读(1774)  评论(0编辑  收藏  举报