MonitorFilter::警告:监视器过滤器必须是链中的第一个过滤器

2023-12-22

Tomcat从8.0.5升级到8.0.9.0后,从浏览器访问页面时,Tomcat服务器在服务器终端上记录以下警告。

MonitorFilter::WARNING: the monitor filter must be the first filter in the chain.
MonitorFilter::WARNING: the monitor filter must be the first filter in the chain.
MonitorFilter::WARNING: the monitor filter must be the first filter in the chain.
MonitorFilter::WARNING: the monitor filter must be the first filter in the chain.
MonitorFilter::WARNING: the monitor filter must be the first filter in the chain.
MonitorFilter::WARNING: the monitor filter must be the first filter in the chain.
MonitorFilter::WARNING: the monitor filter must be the first filter in the chain.
WARNING *********** NetBeans HTTP Monitor ************
The request cannot be recorded most likely because the NetBeans HTTP Monitor module is disabled.
MonitorFilter::WARNING: the monitor filter must be the first filter in the chain.
MonitorFilter::WARNING: the monitor filter must be the first filter in the chain.
MonitorFilter::WARNING: the monitor filter must be the first filter in the chain.
MonitorFilter::WARNING: the monitor filter must be the first filter in the chain.
MonitorFilter::WARNING: the monitor filter must be the first filter in the chain.
MonitorFilter::WARNING: the monitor filter must be the first filter in the chain.
MonitorFilter::WARNING: the monitor filter must be the first filter in the chain.
MonitorFilter::WARNING: the monitor filter must be the first filter in the chain.
MonitorFilter::WARNING: the monitor filter must be the first filter in the chain.
MonitorFilter::WARNING: the monitor filter must be the first filter in the chain.
MonitorFilter::WARNING: the monitor filter must be the first filter in the chain.
MonitorFilter::WARNING: the monitor filter must be the first filter in the chain.
MonitorFilter::WARNING: the monitor filter must be the first filter in the chain.
MonitorFilter::WARNING: the monitor filter must be the first filter in the chain.

相关软件:

  • 春季 4.0.0 正式版
  • Spring Security 3.2.0 正式版。
  • JSF 2.2.8-02
  • PrimeFaces 5.1 最终版
  • PrimeFaces 扩展 2.1.0
  • JDK 8u25
  • NetBeans 8.0.1

web.xml 文件:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" 
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
         http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            /WEB-INF/applicationContext.xml
            /WEB-INF/spring-security.xml
        </param-value>
    </context-param>

    <context-param>
        <param-name>javax.faces.FACELETS_LIBRARIES</param-name>
        <param-value>/WEB-INF/my.taglib.xml</param-value>
    </context-param>

    <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Production</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>server</param-value>
    </context-param>

    <context-param>
        <param-name>log4jConfigLocation</param-name>
        <param-value>/WEB-INF/log4j.properties</param-value>
    </context-param>
    <context-param>
        <param-name>log4jExposeWebAppRoot</param-name>
        <param-value>false</param-value>
    </context-param>

    <filter>
        <filter-name>springSecurityFilterChain</filter-name>
        <filter-class>
            org.springframework.web.filter.DelegatingFilterProxy
        </filter-class>
    </filter>
    <filter-mapping>
        <filter-name>springSecurityFilterChain</filter-name>
        <url-pattern>/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
    </filter-mapping>

    <filter>
        <filter-name>loginNocacheFilter</filter-name>
        <filter-class>filter.LoginNocacheFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>loginNocacheFilter</filter-name>
        <url-pattern>/utility/*</url-pattern>
    </filter-mapping>

    <filter>
        <filter-name>NoCacheFilter</filter-name>
        <filter-class>filter.NoCacheFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>NoCacheFilter</filter-name>
        <url-pattern>/admin_side/*</url-pattern>
    </filter-mapping>

    <listener>
        <listener-class>
            org.springframework.web.context.ContextLoaderListener
        </listener-class>
    </listener>
    <listener>
        <listener-class>
            org.springframework.web.context.request.RequestContextListener
        </listener-class>
    </listener>
    <listener>
        <listener-class>
            org.springframework.security.web.session.HttpSessionEventPublisher
        </listener-class>
    </listener>
    <listener>
        <listener-class>
            org.springframework.web.util.Log4jConfigListener
        </listener-class>
    </listener>

    <filter>
        <filter-name>PrimeFaces FileUpload Filter</filter-name>
        <filter-class>
            org.primefaces.webapp.filter.FileUploadFilter
        </filter-class>
    </filter>
    <filter-mapping>
        <filter-name>PrimeFaces FileUpload Filter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping>

    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.xhtml</url-pattern>
    </servlet-mapping>

    <security-constraint>
        <display-name>Restrict direct access to XHTML files</display-name>
        <web-resource-collection>
            <web-resource-name>XHTML files</web-resource-name>
            <url-pattern>*.xhtml</url-pattern>
        </web-resource-collection>
        <auth-constraint/>
    </security-constraint>
    <session-config>
        <session-timeout>
            120
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>/utility/Login.jsf</welcome-file>
    </welcome-file-list>
        <resource-ref>
        <res-ref-name>jdbc/social_networking</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>
</web-app>

在以前的 Tomcat 服务器(8.0.5)中没有发生这种情况。有解决办法吗?

注意:在我的上一个问题 https://stackoverflow.com/q/14518003/1391249(一年前),我禁用了 HTTP 监视器来抑制警告。这不是一个解决方案。

EDIT : I forgot to mention but it is clear that this warning appears after Filters pertaining to Spring Security are registered in web.xml.


这是使用 HttpMonitor 进行调试时的一个已知的 NB 错误:

https://netbeans.org/bugzilla/show_bug.cgi?id=204775 https://netbeans.org/bugzilla/show_bug.cgi?id=204775

HttpMonitor 可以工作,但如果请求的某些部分之前由 spring 处理(如 spring 安全链),它将跳过它们

您可以尝试给 Spring Security 过滤器一个极高的顺序并希望它起作用,我对此表示怀疑。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

MonitorFilter::警告:监视器过滤器必须是链中的第一个过滤器 的相关文章

随机推荐

  • 如何在Supervisor服务中设置环境变量

    如何在Supervisor执行的命令中导出环境变量 我首先尝试 command export SITE domain1 python manage py command 但主管报告 找不到命令 然后我尝试了 command bin bash
  • 在react中从json获取本地图像路径

    如何选择图片的本地路径 Json avatarUrl avt1 jpg 所有图片都在下面来源 gt img文件夹 我正在寻找 json 中的绝对路径 图像名称 我怎样才能实现这个目标reactJs img src width 60 包 js
  • 在ubuntu上编译protobuf客户端代码,但找不到包含文件

    我刚刚在我的 ubuntu1604 上安装了 google protocol buffer sudo apt install protobuf compiler 并尝试了快速测试 1个proto文件 1个cpp文件来使用它 尝试查看编码 解
  • Launch4J 插件创建一个 EXE(以及 JAR),但 EXE 在 Spring boot 中找不到主类

    我编写了一个插件 在 Launch4J 插件的帮助下为我的项目创建 EXE 和 JAR 但是 在执行 EXE 文件时 我收到错误 Error Could not find or load main class 但是 我通过提供来运行 JAR
  • 在 Android 上通过 bash 脚本启用/禁用 wifi

    我正在尝试在 bash 脚本中启用 禁用 Android 设备中的 wifi 设备 我正在使用终端仿真器和程序脚本管理器在手机 是 root 的 Nexus One 上执行 bash 脚本 在linux中执行此操作的正常方法是这样的 ifc
  • 我在哪里可以找到一些“hello world”-简单的美丽汤示例?

    我想用 Beautiful Soup 做一个非常简单的替换 假设我想访问页面中的所有 A 标记并将 foo 附加到它们的 href 中 有人可以发布或链接到如何做这样简单的事情的示例吗 from BeautifulSoup import B
  • function_exists 返回 false 但声明抛出错误

    在 PHP 5 3 6 中 我有一个类 其方法如下 public function chunkText if function exists unloadChunkText function unloadChunkText 其中 unloa
  • java中浮点数和双精度数有多少位有效数字?

    float 是否有 32 位二进制数字 double 是否有 64 位二进制数字 该文档太难理解了 所有位都转换为有效数字吗 还是小数点的位置占用了一些位 float 32 bits 4 bytes where 23 bits are us
  • Javascript 中“new”关键字的限制

    我有这个JS代码 var A A new function n return new Array n 它在所有浏览器中都运行良好 但是当我尝试用它来混淆它时混淆器 http javascriptobfuscator com 它显示一个错误
  • 从另一个 Dart 程序运行交互式 Dart 程序

    我有一个相当长的命令行程序 需要用户输入参数 然后使用这些参数进行处理 我想做的是将程序分为交互式和非交互式 我尝试这样做 并打算让非交互式程序 调用 交互式程序并使用结果 参数 根据这些参数进行处理 程序的非交互部分在处理时将结果显示在控
  • 无法查看 Xcode 4.2 帮助“index.html”被锁定以进行编辑

    当我尝试在 Xcode 中搜索文档时 出现以下错误 index html 已被锁定进行编辑 您可能无法保存更改 你想解锁它吗 index html 目前已被锁定 因为它不支持编辑 文件 index html 无法解锁 无法向该文件添加写入权
  • AWS RedShift - .NET Core(ODBC 支持?)

    如何使用 NET Core 连接 AWS RedShift 并运行查询 请提供代码示例 我已经阅读了 AWS 文档和 Net Core 文档 但没有运气 这个答案是针对特定时间点的 不会过时 EntityFramework Core 项目是
  • Google Map APi 缩放栏未显示

    Google 地图 api 没有完全显示缩放栏和图像类型 而是仅显示用于放大和缩小的加减按钮以及用于选择地图类型的下拉按钮 网址是http booking smanager net design index php lv 2 http bo
  • Python - 获取浏览器重定向到的url

    我正在尝试使用 API 验证应用程序 就是这样 我正在使用打开一个 URLwebbrowser open 用户对应用程序进行身份验证 并被重定向到另一个 URL 即 https stackexchange com oauth login s
  • 递归下降解析器和函数式编程

    所以最近我一直致力于编写一个简单的编译器 以更好地理解编译器概念 作为 stackoverflow 的忠实读者 似乎有一个共识 用函数式语言编写编译器比命令式语言更容易 为此 我想尝试一下杀两只鸟 用 F 编写一个编译器 既学习函数式语言
  • 如果ListBox包含,则不添加

    我有一个方法 FillListBox 我从不同的地方调用这个方法 但有时会发生这种情况 东西被加载了两次 现在我正在尝试做类似的事情 if listBox Items 1 ToString hello DO NOT FILL else FI
  • 修复 shell 脚本以增加 semversion [重复]

    这个问题在这里已经有答案了 我从未使用过 shell bash 但在脚本中发现了一些错误 我用它来增加版本 脚本工作正常 直到这种情况 version 1 27 9 echo version awk F v OFS NF 1 print N
  • Java 和 Clojure 与 Leiningen

    是否可以在使用 leiningen 的项目中轻松管理和编译本机 Java 类以及 Clojure 我的工作水平相当低 使用 netty nio 并且认为一些管道类实际上在构建代码和性能方面更容易作为原始 java 进行处理 从 Leinin
  • 控制器可以将接口实例作为参数吗? ASP.NET MVC

    ASP NET 控制器操作方法可以将接口作为参数之一吗 我想要这样的东西 class MyController HttpPost public ActionResult Action IMyModel model 是否可以 显然 我必须告诉
  • MonitorFilter::警告:监视器过滤器必须是链中的第一个过滤器

    Tomcat从8 0 5升级到8 0 9 0后 从浏览器访问页面时 Tomcat服务器在服务器终端上记录以下警告 MonitorFilter WARNING the monitor filter must be the first filt