1.需要配置tomcat-user.xml
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="manager "/>
<role rolename="admin "/>
<role rolename="poweruser "/>
<role rolename="manager"/>
<role rolename="tomcat"/>
<role rolename="admin"/>
<role rolename="poweruser"/>
<role rolename="role1"/>
<role rolename="user"/>
<role rolename="probeuser "/>
<role rolename="tomcat "/>
<role rolename="probeuser"/>
<user username="admin " password="admin" roles="admin,user,manager,poweruser,probeuser"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="admin" password="123456" roles="admin,manager"/>
<user username="role1" password="tomcat" roles="role1"/>
</tomcat-users>
2.将probe.war 放到webapps下
访问的时候的用户名密码就是<user username="admin" password="123456" roles="admin,manager"/>