我说的是 tomcat 进去之后的 那个host manage 打不开 401 Unauthorized You are not authorized to view this page. If you have not changed any configuration files, please examine the file conf/tomcat-users.xml in your installation. That file must contain the credentials to let you use this webapp. For example, to add the admin-gui role to a user named tomcat with a password of s3cret, add the following to the config file listed above. <role rolename="admin-gui"/> <user username="tomcat" password="s3cret" roles="admin-gui"/> Note that for Tomcat 7 onwards, the roles required to use the host manager application were changed from the single admin role to the following two roles. You will need to assign the role(s) required for the functionality you wish to access. •admin-gui - allows access to the HTML GUI •admin-script - allows access to the text interface The HTML interface is protected against CSRF but the text interface is not. To maintain the CSRF protection: •Users with the admin-gui role should not be granted the admin-script role. •If the text interface is accessed through a browser (e.g. for testing since this interface is intended for tools not humans) then the browser must be closed afterwards to terminate the session.
tomcat启动后,按默认配置的话,打开http://127.0.0.1:8080/manager/html默认用户名是admin,密码是空。
如果安装完了你还需要配置邪的话 打开你Tomcat 安装目录下conf 下有一个tomcat-users.xml 你进去修改下你想要的名字和密码即可!注意:用户名必须和web.xml里面的用户名对应 不然当你进去admian管理页面时会报错
401 Unauthorized You are not authorized to view this page. If you have not changed any configuration files, please examine the file conf/tomcat-users.xml in your installation. That file must contain the credentials to let you use this webapp. For example, to add the admin-gui role to a user named tomcat with a password of s3cret, add the following to the config file listed above.
<role rolename="admin-gui"/>
<user username="tomcat" password="s3cret" roles="admin-gui"/> Note that for Tomcat 7 onwards, the roles required to use the host manager application were changed from the single admin role to the following two roles. You will need to assign the role(s) required for the functionality you wish to access.
•admin-gui - allows access to the HTML GUI
•admin-script - allows access to the text interface The HTML interface is protected against CSRF but the text interface is not. To maintain the CSRF protection:
•Users with the admin-gui role should not be granted the admin-script role.
•If the text interface is accessed through a browser (e.g. for testing since this interface is intended for tools not humans) then the browser must be closed afterwards to terminate the session.
<user username="xxxxxx" password="xxxxx" roles="manager-gui"/>试试
配置用户的文件就是3楼说的那个文件。那个文件中有配置方法的说明。祝好运。