tomcat7默认是将用户是注释的,配置文件在根目录下/conf/tomcat-users.xml文件,进入tomcat目录下的conf中的tomcat-users.xml:
配置默认如下:
<!--
<role rolename="tomcat"/>
<role rolename="role1"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
-->
可以不用管注释里的内容,在下面添加
增加以下语句
<role rolename="admin-gui"/>
<role rolename="admin-script"/>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<user username="tomcat" password="tomcat" roles="manager-gui,manager-script,manager-jmx,manager-status,admin-script,admin-gui"/>
保存后启动tomcat,输入用户名:tomcat,密码:tomcat
訪問地址:http://localhost:8080/manager/html
____________________________________________
几点说明:
1.undeploy 删除的文件 :删除后,将不可恢复。
2.expire sessions idle[空闲]]
此文章是转载的,原博客地址 http://blog.csdn.net/bonlog/article/details/9289371
配置默认如下:
<!--
<role rolename="tomcat"/>
<role rolename="role1"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
-->
可以不用管注释里的内容,在下面添加
增加以下语句
<role rolename="admin-gui"/>
<role rolename="admin-script"/>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<user username="tomcat" password="tomcat" roles="manager-gui,manager-script,manager-jmx,manager-status,admin-script,admin-gui"/>
保存后启动tomcat,输入用户名:tomcat,密码:tomcat
訪問地址:http://localhost:8080/manager/html
____________________________________________
几点说明:
1.undeploy 删除的文件 :删除后,将不可恢复。
2.expire sessions idle[空闲]]
此文章是转载的,原博客地址 http://blog.csdn.net/bonlog/article/details/9289371