我正在尝试访问/manager
由 NetBeans 7.1.2 安装的 Tomcat 实例的页面。
当我右键单击属性的相应树节点时,我得到这个:
这似乎表明我可以使用这些凭据,但它们不起作用。
当我查看时tomcat-users.xml
,该用户似乎不存在:
<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.
-->
<!--
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"/>
-->
</tomcat-users>
我应该创建它吗?如果是,我已经尝试过,但找不到合适的角色。什么是正确的添加行?(是的,我已经重新启动了 Tomcat)