应用场景:
本地开发好之后,利用Maven插件将War包发布到测试环境Tomcat容器中。
【步骤】
第一步,编辑 %CATALINA_HOME%/conf/tomcat-users.xml,设置Tomcat用户。
<tomcat-users>
<!--
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.
-->
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="tomcat" password="123456"
roles="manager-gui,manager-script"/>
</tomcat-users>