tomcat Access Denied 问题的解决方法

来源:互联网 发布:怎么维护网络商铺 编辑:程序博客网 时间:2024/05/01 11:58

当我打开localhost:8080想在tomcat7上动态部署项目时,遇到了这个问题。

403 Access DeniedYou are not authorized to view this page.If you have already configured the Manager application to allow access and you have used your browsers back button...

解决方法:
进入tomat根目录,修改conf/tomcat_users.xml文件

vi conf/tomcat-users.xml

修改为

<?xml version='1.0' encoding='utf-8'?>                                                                                 <tomcat-users> <role rolename="admin"/> <role rolename="admin-gui"/> <role rolename="manager"/> <role rolename="manager-gui"/> <role rolename="manager-script"/> <user username="admin" password="admin123" roles="admin,admin-gui,manager,manager-gui,manager-script"/></tomcat-users>

重启tomcat,

sh bin/shutdown.shsh bin/startup.sh 

现在在打开tomcat管理页面
,输入上面设置的用户名:admin 和密码: admin123,看看是不是可以访问了。

0 0
原创粉丝点击