403 Access Denied

You 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, used a saved book-mark or similar then you may have triggered the cross-site request forgery (CSRF) protection that has been enabled for the HTML interface of the Manager application. You will need to reset this protection by returning to the main Manager page. Once you return to this page, you will be able to continue using the Manager appliction’s HTML interface normally. If you continue to see this access denied message, check that you have the necessary permissions to access this application.

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 manager-gui role to a user named tomcat with a password of s3cret, add the following to the config file listed above.

Note that for Tomcat 7 onwards, the roles required to use the manager application were changed from the single manager role to the following four roles. You will need to assign the role(s) required for the functionality you wish to access.

manager-gui - allows access to the HTML GUI and the status pages
manager-script - allows access to the text interface and the status pages
manager-jmx - allows access to the JMX proxy and the status pages
manager-status - allows access to the status pages only
The HTML interface is protected against CSRF but the text and JMX interfaces are not. To maintain the CSRF protection:

Users with the manager-gui role should not be granted either the manager-script or manager-jmx roles.
If the text or jmx interfaces are accessed through a browser (e.g. for testing since these interfaces are intended for tools not humans) then the browser must be closed afterwards to terminate the session.

一般遇到此问题的解决方案是:
D:\tomcat-8.5.34\conf/tomcat-users.xml
在此文件中添加用户和角色:

但是tomcat8.5 更改之后,仍然访问拒绝。

还需步骤如下:
D:\tomcat-8.5.34/webapps/manager/META-INF/context.xml

备注:将
Valve className=”org.apache.catalina.valves.RemoteAddrValve”
allow=”127.\d+.\d+.\d+|::1|0:0:0:0:0:0:0:1” /> 注解掉。

之后就可以访问 localhost:8080/manager/html页面

JavaWeb——tomcat manager 403 Access Denied .You are not authorized to view this page.的更多相关文章

  1. tomcat在浏览器输入用户名和密码后报错Tomcat Manager App--403 Access Denied You are not authorized to view this page

    报错截图:Tomcat Manager App--403 Access Denied You are not authorized to view this page 解决办法: 1.关闭Tomcat ...

  2. Tomcat8访问管理页面localhost出现:403 Access Denied

    问题: Access Denied You are not authorized to view this page. If you have already configured the Manag ...

  3. Tomcat的Manager显示403 Access Denied

    管理tomcat的时候遇到了以下问题: 1.刚开始需要用户名密码,不知道用户名和密码是什么,但是输入什么都不正确. 解决办法: 自己在tomcat-users.xml中按格式添加用户 conf文件夹里 ...

  4. Tomcat 9.0 配置问题 403 Access Denied

    tomcat9.0 管理页面如:http://10.10.10.10:8080/manager/html出现如下错误: 403 Access Denied 1.需要配置: Tomcat/conf/to ...

  5. tomcat管理页面403 Access Denied的解决方法

    安装tomcat,配置好tomcat环境变量以后,访问manager app页面,出现403 Access Denied错误,解决的方法如下: 首先在conf/tomcat-users.xml文件里面 ...

  6. tomcat8 管理页面403 Access Denied的解决方法

      安装tomcat,配置好tomcat环境变量以后,访问manager app页面,出现403 Access Denied错误,解决的方法如下: 首先在conf/tomcat-users.xml文件 ...

  7. linux 访问tomcat 管理页面时 You are not authorized to view this page 403(真实可用)

    ava代码 收藏代码 You are not authorized to view this page. If you have not changed any configuration files ...

  8. 运行JavaWeb项目报错Access denied for user 'root'@'localhost' (using password: YES)

    问题重现:(以下讨论范围仅限Windows环境): C:\AppServ\MySQL> mysql -u root -p Enter password: ERROR 1045 (28000):  ...

  9. 403 Access Denied :进入Tomcat的manager时拒绝访问

    解决办法: https://blog.csdn.net/Hello_World_QWP/article/details/79581174

随机推荐

  1. Json 网络传递解析异常

    在项目中碰到一个bug,A项目请求B项目,获取到的Json无法解析,B项目封装的Json,在项目内部可以正常解析,问题并不是Json 解析的错误,而是实体Bean中有数组类型的字段;解决办法就是对封装 ...

  2. Spring mvc初学

    转自:http://www.cnblogs.com/bigdataZJ/p/springmvc1.html 从今天起,准备好好审视并学习Spring mvc. 虽然从学java的第一个程序——hell ...

  3. 笨办法30Else 和 If

    people = 30 cars = 40 trucks = 30 if cars < people: print "We should take the cars." el ...

  4. 用Nginx给网站做一个简单的防盗链

    目录结构 Nginx防盗链配置 有些时候,大家不想让别人调用自己的图片,一是因为个人版权的问题,再一点就是会增加服务器的负载.还会产生一些没必要的流量. 其实在Nginx里面,很容易就做到防盗链的,在 ...

  5. web工程启动时,在一个类中延迟加载Bean,因为该Bean类可能还没被JVM加载

     问题描述: (1)javaWeb项目启动中,还没启动完成,在下面这个类加载另一个Bean类, (2)通过getBean方法获取到该Bean,可以获取到,不为null (3)但是,调用该Bean的方法 ...

  6. 马凯军201771010116《面向对象程序设计(java)》第四周学习总结

    第一部分:理论知识学习部分 第四章 1.类与对象的基础概念. 对象:即数据,对象有三个特性:行为 .状态.标识. 类是对象,事物的描述和抽象,是具有相同属性和行为的对象集合.对象则是该类事物的实例. ...

  7. Dubbo的全局Filter配置

    前言: 之前也写过dubbo的filter的文章, 后来和同事也有过交流, 才发生自己对dubbo的filter的机制, 还是存在一些误解, 尤其是自定义filter的定位, 不是那么清晰. 本文主要 ...

  8. 源代码安装-非ROOT用户安装软件的方法

    0.    前言 如果你没有sudo权限,则很多程序是无法使用别人编译好的文件安装的. 还有时候,没有对应你的主机配置的安装包,这时候需要我们自己下载最原始的源代码,然后进行编译安装. 这样安装的程序 ...

  9. Gym - 101490F:Endless Turning (半平面交)

    pro:给定R条街道,现在小孩在某条街上骑车车,最开始他沿着所在街道向东(1,4象限的方向)驶去,如果他遇到街道的交叉口,他会右转.问他转N次后在哪个街道.有特殊情况是他一只遇不到交叉口,会沿着街道一 ...

  10. SpringBoot配置SSL证书支持

    Spring Boot配置ssl证书 一.申请SSL证书 在各大云服务商都可以申请到SSL官方证书. 我这里是在阿里云上申请的,申请后下载,解压.如图:  二.用JDK中keytool是一个证书管理工 ...