進入manager App時須要用戶名+密碼web
輸入錯誤時會出現頁面以下:apache
根據提示去服務器中找到tomcat目錄下的tomcat-user.xml文件tomcat
在指定位置添加語句 <user username="admin" password="admin" roles="manager-gui"/>服務器
案例以下:ui
[root@instance-ozyu8y37 apache-tomcat-8.0.53]# cd confspa
[root@instance-ozyu8y37 conf]# lsserver
Catalina context.xml tomcat-users.xmlxml
catalina.policy logging.properties tomcat-users.xsdblog
catalina.properties server.xml web.xmlit
[root@instance-ozyu8y37 conf]# vi tomcat-users.xml
<!--
<role rolename="tomcat"/>
<role rolename="role1"/>
<user username="tomcat" password="<must-be-changed>" roles="tomcat"/>
<user username="both" password="<must-be-changed>" roles="tomcat,role1"/>
<user username="role1" password="<must-be-changed>" roles="role1"/>
-->
<user username="admin" password="admin" roles="manager-gui"/>
</tomcat-users>