tomcat提供了一个管理程序:manager,它用于查看部署到tomcat服务器中的web应用程序。
要访问manager web应用程序,须要添加具备管理员权限的帐号。即须要去编辑/conf/tomcat-users.xml文件。具体以下
1.启动tomcat
2.在浏览器输入http://localhost:8080/
出现以下界面
右上角很明显有个Manager App与Host Manager
3.咱们须要查看运行的App,所以点击Manager App,出现以下页面
点击取消,会出现以下页面
很明显是让咱们修改 conf/tomcat-users.xml文件, add the admin-gui role to a user named tomcat with a password of s3cret,添加一个管理员角色,并为其设置帐号与密码,格式以下html
<role rolename="admin-gui"/> <user username="tomcat" password="s3cret" roles="admin-gui"/>
我这里设置帐号lxl,密码123456,重启tomcat,在浏览器输入http://localhost:8080/,点击Manager App,输入帐号与密码,即到了这个页面http://localhost:8080/manager/html,图以下web