安装Tomcat5.5之后,发现Tomcat Manager登陆不进去.
Tomcat Manager应用程序位于server\webapps下,查看Web.xml
发现这段代码:
<auth-constraint>
<role-name>manager</role-name>
</auth-constraint>
发现这段代码:
<auth-constraint>
<role-name>manager</role-name>
</auth-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Tomcat Manager Application</realm-name>
</login-config>
<auth-method>BASIC</auth-method>
<realm-name>Tomcat Manager Application</realm-name>
</login-config>
<security-role>
<description>
The role that is required to log in to the Manager Application
</description>
<role-name>manager</role-name>
</security-role>
Manager应用程序采用BASIC,只有manager角色下的成员才可以访问资源。
打开conf/tomcat-users.xml文件,添加
<user username="admin" password="pwd" roles="manager"/>
访问 http://localhost:8001/manager/html,Great,success!
<description>
The role that is required to log in to the Manager Application
</description>
<role-name>manager</role-name>
</security-role>
Manager应用程序采用BASIC,只有manager角色下的成员才可以访问资源。
打开conf/tomcat-users.xml文件,添加
<user username="admin" password="pwd" roles="manager"/>
访问 http://localhost:8001/manager/html,Great,success!
本文转自 anranran 51CTO博客,原文链接:http://blog.51cto.com/guojuanjun/321740