版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sunrising_hill/article/details/73566798
配置文件tomcat-user.xml修改:
<tomcat-users xmlns="http://tomcat.apache.org/xml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
version="1.0">
<!--
NOTE: By default, no user is included in the "manager-gui" role required
to operate the "/manager/html" web application. If you wish to use this app,
you must define such a user - the username and password are arbitrary.
-->
<!--
NOTE: The sample user and role entries below are wrapped in a comment
and thus are ignored when reading this file. Do not forget to remove
<!.. ..> that surrounds them.
-->
<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"/>
<user username="tomcat" password="tomcat" roles="admin-gui"/>
<role rolename="manager-gui"/>
<user username="tomcat-manager" password="123" roles="manager-gui"/>
<role rolename="admin-gui"/>
<user username="tomcat-admin" password="123" roles="admin-gui"/>
</tomcat-users>
点击Manager App按钮,使用“manager-gui”的用户名密码登录,就可以看到管理页面。
点击图1中的Host Manager按钮,使用“admin-gui”的用户名密码登录,进入host管理页面: