blob: 501e20fa01f5a3a6b96a1ee20bee93c616be97a0 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>PathMatchingFilter (Apache Shiro 1.10.1 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.6.0.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.min.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="PathMatchingFilter (Apache Shiro 1.10.1 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav"><!-- Matomo --> <script> var _paq = window._paq = window._paq || []; /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ /* We explicitly disable cookie tracking to avoid privacy issues */ _paq.push(['disableCookies']); _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u="//matomo.privacy.apache.org/"; _paq.push(['setTrackerUrl', u+'matomo.php']); _paq.push(['setSiteId', '2']); var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); })(); </script> <!-- End Matomo Code -->
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/PathMatchingFilter.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.shiro.web.filter</a></div>
<h2 title="Class PathMatchingFilter" class="title">Class PathMatchingFilter</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../servlet/ServletContextSupport.html" title="class in org.apache.shiro.web.servlet">org.apache.shiro.web.servlet.ServletContextSupport</a></li>
<li>
<ul class="inheritance">
<li><a href="../servlet/AbstractFilter.html" title="class in org.apache.shiro.web.servlet">org.apache.shiro.web.servlet.AbstractFilter</a></li>
<li>
<ul class="inheritance">
<li><a href="../servlet/NameableFilter.html" title="class in org.apache.shiro.web.servlet">org.apache.shiro.web.servlet.NameableFilter</a></li>
<li>
<ul class="inheritance">
<li><a href="../servlet/OncePerRequestFilter.html" title="class in org.apache.shiro.web.servlet">org.apache.shiro.web.servlet.OncePerRequestFilter</a></li>
<li>
<ul class="inheritance">
<li><a href="../servlet/AdviceFilter.html" title="class in org.apache.shiro.web.servlet">org.apache.shiro.web.servlet.AdviceFilter</a></li>
<li>
<ul class="inheritance">
<li>org.apache.shiro.web.filter.PathMatchingFilter</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="https://docs.oracle.com/javaee/5/api/javax/servlet/Filter.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">Filter</a></code>, <code><a href="../../util/Nameable.html" title="interface in org.apache.shiro.util">Nameable</a></code>, <code><a href="PathConfigProcessor.html" title="interface in org.apache.shiro.web.filter">PathConfigProcessor</a></code></dd>
</dl>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="AccessControlFilter.html" title="class in org.apache.shiro.web.filter">AccessControlFilter</a></code>, <code><a href="authc/AnonymousFilter.html" title="class in org.apache.shiro.web.filter.authc">AnonymousFilter</a></code>, <code><a href="session/NoSessionCreationFilter.html" title="class in org.apache.shiro.web.filter.session">NoSessionCreationFilter</a></code></dd>
</dl>
<hr>
<pre>public abstract class <a href="../../../../../src-html/org/apache/shiro/web/filter/PathMatchingFilter.html#line.42">PathMatchingFilter</a>
extends <a href="../servlet/AdviceFilter.html" title="class in org.apache.shiro.web.servlet">AdviceFilter</a>
implements <a href="PathConfigProcessor.html" title="interface in org.apache.shiro.web.filter">PathConfigProcessor</a></pre>
<div class="block"><p>Base class for Filters that will process only specified paths and allow all others to pass through.</p></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.9</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<section>
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#appliedPaths">appliedPaths</a></span></code></th>
<td class="colLast">
<div class="block">A collection of path-to-config entries where the key is a path which this filter should process and
the value is the (possibly null) configuration element specific to this Filter for that specific path.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="../../util/PatternMatcher.html" title="interface in org.apache.shiro.util">PatternMatcher</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#pathMatcher">pathMatcher</a></span></code></th>
<td class="colLast">
<div class="block">PatternMatcher used in determining which paths to react to for a given request.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.org.apache.shiro.web.servlet.OncePerRequestFilter">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.apache.shiro.web.servlet.<a href="../servlet/OncePerRequestFilter.html" title="class in org.apache.shiro.web.servlet">OncePerRequestFilter</a></h3>
<code><a href="../servlet/OncePerRequestFilter.html#ALREADY_FILTERED_SUFFIX">ALREADY_FILTERED_SUFFIX</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.org.apache.shiro.web.servlet.AbstractFilter">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.apache.shiro.web.servlet.<a href="../servlet/AbstractFilter.html" title="class in org.apache.shiro.web.servlet">AbstractFilter</a></h3>
<code><a href="../servlet/AbstractFilter.html#filterConfig">filterConfig</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section>
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">PathMatchingFilter</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section>
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPathWithinApplication(javax.servlet.ServletRequest)">getPathWithinApplication</a></span>&#8203;(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a>&nbsp;request)</code></th>
<td class="colLast">
<div class="block">Returns the context path within the application based on the specified <code>request</code>.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isEnabled(javax.servlet.ServletRequest,javax.servlet.ServletResponse,java.lang.String,java.lang.Object)">isEnabled</a></span>&#8203;(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a>&nbsp;request,
<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletResponse</a>&nbsp;response,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;path,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;mappedValue)</code></th>
<td class="colLast">
<div class="block">Path-matching version of the parent class's
<a href="../servlet/OncePerRequestFilter.html#isEnabled(javax.servlet.ServletRequest,javax.servlet.ServletResponse)"><code>OncePerRequestFilter.isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse)</code></a> method, but additionally allows
for inspection of any path-specific configuration values corresponding to the specified request.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onPreHandle(javax.servlet.ServletRequest,javax.servlet.ServletResponse,java.lang.Object)">onPreHandle</a></span>&#8203;(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a>&nbsp;request,
<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletResponse</a>&nbsp;response,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;mappedValue)</code></th>
<td class="colLast">
<div class="block">This default implementation always returns <code>true</code> and should be overridden by subclasses for custom
logic if necessary.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#pathsMatch(java.lang.String,java.lang.String)">pathsMatch</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;pattern,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;path)</code></th>
<td class="colLast">
<div class="block">Returns <code>true</code> if the <code>path</code> matches the specified <code>pattern</code> string,
<code>false</code> otherwise.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#pathsMatch(java.lang.String,javax.servlet.ServletRequest)">pathsMatch</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;path,
<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a>&nbsp;request)</code></th>
<td class="colLast">
<div class="block">Returns <code>true</code> if the incoming <code>request</code> matches the specified <code>path</code> pattern,
<code>false</code> otherwise.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#preHandle(javax.servlet.ServletRequest,javax.servlet.ServletResponse)">preHandle</a></span>&#8203;(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a>&nbsp;request,
<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletResponse</a>&nbsp;response)</code></th>
<td class="colLast">
<div class="block">Implementation that handles path-matching behavior before a request is evaluated.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javaee/5/api/javax/servlet/Filter.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">Filter</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#processPathConfig(java.lang.String,java.lang.String)">processPathConfig</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;path,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;config)</code></th>
<td class="colLast">
<div class="block">Splits any comma-delmited values that might be found in the <code>config</code> argument and sets the resulting
<code>String[]</code> array on the <code>appliedPaths</code> internal Map.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.apache.shiro.web.servlet.AdviceFilter">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.shiro.web.servlet.<a href="../servlet/AdviceFilter.html" title="class in org.apache.shiro.web.servlet">AdviceFilter</a></h3>
<code><a href="../servlet/AdviceFilter.html#afterCompletion(javax.servlet.ServletRequest,javax.servlet.ServletResponse,java.lang.Exception)">afterCompletion</a>, <a href="../servlet/AdviceFilter.html#cleanup(javax.servlet.ServletRequest,javax.servlet.ServletResponse,java.lang.Exception)">cleanup</a>, <a href="../servlet/AdviceFilter.html#doFilterInternal(javax.servlet.ServletRequest,javax.servlet.ServletResponse,javax.servlet.FilterChain)">doFilterInternal</a>, <a href="../servlet/AdviceFilter.html#executeChain(javax.servlet.ServletRequest,javax.servlet.ServletResponse,javax.servlet.FilterChain)">executeChain</a>, <a href="../servlet/AdviceFilter.html#postHandle(javax.servlet.ServletRequest,javax.servlet.ServletResponse)">postHandle</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.apache.shiro.web.servlet.OncePerRequestFilter">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.shiro.web.servlet.<a href="../servlet/OncePerRequestFilter.html" title="class in org.apache.shiro.web.servlet">OncePerRequestFilter</a></h3>
<code><a href="../servlet/OncePerRequestFilter.html#doFilter(javax.servlet.ServletRequest,javax.servlet.ServletResponse,javax.servlet.FilterChain)">doFilter</a>, <a href="../servlet/OncePerRequestFilter.html#getAlreadyFilteredAttributeName()">getAlreadyFilteredAttributeName</a>, <a href="../servlet/OncePerRequestFilter.html#isEnabled()">isEnabled</a>, <a href="../servlet/OncePerRequestFilter.html#isEnabled(javax.servlet.ServletRequest,javax.servlet.ServletResponse)">isEnabled</a>, <a href="../servlet/OncePerRequestFilter.html#isFilterOncePerRequest()">isFilterOncePerRequest</a>, <a href="../servlet/OncePerRequestFilter.html#setEnabled(boolean)">setEnabled</a>, <a href="../servlet/OncePerRequestFilter.html#setFilterOncePerRequest(boolean)">setFilterOncePerRequest</a>, <a href="../servlet/OncePerRequestFilter.html#shouldNotFilter(javax.servlet.ServletRequest)">shouldNotFilter</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.apache.shiro.web.servlet.NameableFilter">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.shiro.web.servlet.<a href="../servlet/NameableFilter.html" title="class in org.apache.shiro.web.servlet">NameableFilter</a></h3>
<code><a href="../servlet/NameableFilter.html#getName()">getName</a>, <a href="../servlet/NameableFilter.html#setName(java.lang.String)">setName</a>, <a href="../servlet/NameableFilter.html#toStringBuilder()">toStringBuilder</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.apache.shiro.web.servlet.AbstractFilter">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.shiro.web.servlet.<a href="../servlet/AbstractFilter.html" title="class in org.apache.shiro.web.servlet">AbstractFilter</a></h3>
<code><a href="../servlet/AbstractFilter.html#destroy()">destroy</a>, <a href="../servlet/AbstractFilter.html#getFilterConfig()">getFilterConfig</a>, <a href="../servlet/AbstractFilter.html#getInitParam(java.lang.String)">getInitParam</a>, <a href="../servlet/AbstractFilter.html#init(javax.servlet.FilterConfig)">init</a>, <a href="../servlet/AbstractFilter.html#onFilterConfigSet()">onFilterConfigSet</a>, <a href="../servlet/AbstractFilter.html#setFilterConfig(javax.servlet.FilterConfig)">setFilterConfig</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.apache.shiro.web.servlet.ServletContextSupport">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.shiro.web.servlet.<a href="../servlet/ServletContextSupport.html" title="class in org.apache.shiro.web.servlet">ServletContextSupport</a></h3>
<code><a href="../servlet/ServletContextSupport.html#getContextAttribute(java.lang.String)">getContextAttribute</a>, <a href="../servlet/ServletContextSupport.html#getContextInitParam(java.lang.String)">getContextInitParam</a>, <a href="../servlet/ServletContextSupport.html#getServletContext()">getServletContext</a>, <a href="../servlet/ServletContextSupport.html#removeContextAttribute(java.lang.String)">removeContextAttribute</a>, <a href="../servlet/ServletContextSupport.html#setContextAttribute(java.lang.String,java.lang.Object)">setContextAttribute</a>, <a href="../servlet/ServletContextSupport.html#setServletContext(javax.servlet.ServletContext)">setServletContext</a>, <a href="../servlet/ServletContextSupport.html#toString()">toString</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section>
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a id="pathMatcher">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>pathMatcher</h4>
<pre>protected&nbsp;<a href="../../util/PatternMatcher.html" title="interface in org.apache.shiro.util">PatternMatcher</a> <a href="../../../../../src-html/org/apache/shiro/web/filter/PathMatchingFilter.html#line.54">pathMatcher</a></pre>
<div class="block">PatternMatcher used in determining which paths to react to for a given request.</div>
</li>
</ul>
<a id="appliedPaths">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>appliedPaths</h4>
<pre>protected&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>,&#8203;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&gt; <a href="../../../../../src-html/org/apache/shiro/web/filter/PathMatchingFilter.html#line.64">appliedPaths</a></pre>
<div class="block">A collection of path-to-config entries where the key is a path which this filter should process and
the value is the (possibly null) configuration element specific to this Filter for that specific path.
<p/>
<p>To put it another way, the keys are the paths (urls) that this Filter will process.
<p>The values are filter-specific data that this Filter should use when processing the corresponding
key (path). The values can be null if no Filter-specific config was specified for that url.</div>
</li>
</ul>
</li>
</ul>
</section>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section>
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>PathMatchingFilter</h4>
<pre>public&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/filter/PathMatchingFilter.html#line.42">PathMatchingFilter</a>()</pre>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section>
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="processPathConfig(java.lang.String,java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>processPathConfig</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/Filter.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">Filter</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/filter/PathMatchingFilter.html#line.84">processPathConfig</a>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;path,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;config)</pre>
<div class="block">Splits any comma-delmited values that might be found in the <code>config</code> argument and sets the resulting
<code>String[]</code> array on the <code>appliedPaths</code> internal Map.
<p/>
That is:
<pre><code>
String[] values = null;
if (config != null) {
values = split(config);
}
<p/>
this.<a href="#appliedPaths"><code>appliedPaths</code></a>.put(path, values);
</code></pre></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="PathConfigProcessor.html#processPathConfig(java.lang.String,java.lang.String)">processPathConfig</a></code>&nbsp;in interface&nbsp;<code><a href="PathConfigProcessor.html" title="interface in org.apache.shiro.web.filter">PathConfigProcessor</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>path</code> - the application context path to match for executing this filter.</dd>
<dd><code>config</code> - the specified for <em>this particular filter only</em> for the given <code>path</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this configured filter.</dd>
</dl>
</li>
</ul>
<a id="getPathWithinApplication(javax.servlet.ServletRequest)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPathWithinApplication</h4>
<pre class="methodSignature">protected&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/filter/PathMatchingFilter.html#line.104">getPathWithinApplication</a>&#8203;(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a>&nbsp;request)</pre>
<div class="block">Returns the context path within the application based on the specified <code>request</code>.
<p/>
This implementation merely delegates to
<a href="../util/WebUtils.html#getPathWithinApplication(javax.servlet.http.HttpServletRequest)"><code>WebUtils.getPathWithinApplication(request)</code></a>,
but can be overridden by subclasses for custom logic.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>request</code> - the incoming <code>ServletRequest</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the context path within the application.</dd>
</dl>
</li>
</ul>
<a id="pathsMatch(java.lang.String,javax.servlet.ServletRequest)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>pathsMatch</h4>
<pre class="methodSignature">protected&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/filter/PathMatchingFilter.html#line.123">pathsMatch</a>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;path,
<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a>&nbsp;request)</pre>
<div class="block">Returns <code>true</code> if the incoming <code>request</code> matches the specified <code>path</code> pattern,
<code>false</code> otherwise.
<p/>
The default implementation acquires the <code>request</code>'s path within the application and determines
if that matches:
<p/>
<code>String requestURI = <a href="#getPathWithinApplication(javax.servlet.ServletRequest)"><code>getPathWithinApplication(request)</code></a>;<br/>
return <a href="#pathsMatch(java.lang.String,java.lang.String)"><code>pathsMatch(path,requestURI)</code></a></code></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>path</code> - the configured url pattern to check the incoming request against.</dd>
<dd><code>request</code> - the incoming ServletRequest</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the incoming <code>request</code> matches the specified <code>path</code> pattern,
<code>false</code> otherwise.</dd>
</dl>
</li>
</ul>
<a id="pathsMatch(java.lang.String,java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>pathsMatch</h4>
<pre class="methodSignature">protected&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/filter/PathMatchingFilter.html#line.158">pathsMatch</a>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;pattern,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;path)</pre>
<div class="block">Returns <code>true</code> if the <code>path</code> matches the specified <code>pattern</code> string,
<code>false</code> otherwise.
<p/>
Simply delegates to
<b><code>this.pathMatcher.<a href="../../util/PatternMatcher.html#matches(java.lang.String,java.lang.String)"><code>matches(pattern,path)</code></a></code></b>,
but can be overridden by subclasses for custom matching behavior.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pattern</code> - the pattern to match against</dd>
<dd><code>path</code> - the value to match with the specified <code>pattern</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the <code>path</code> matches the specified <code>pattern</code> string,
<code>false</code> otherwise.</dd>
</dl>
</li>
</ul>
<a id="preHandle(javax.servlet.ServletRequest,javax.servlet.ServletResponse)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>preHandle</h4>
<pre class="methodSignature">protected&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/filter/PathMatchingFilter.html#line.183">preHandle</a>&#8203;(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a>&nbsp;request,
<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletResponse</a>&nbsp;response)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang" class="externalLink">Exception</a></pre>
<div class="block">Implementation that handles path-matching behavior before a request is evaluated. If the path matches and
the filter
<a href="#isEnabled(javax.servlet.ServletRequest,javax.servlet.ServletResponse,java.lang.String,java.lang.Object)"><code>isEnabled</code></a> for
that path/config, the request will be allowed through via the result from
<a href="#onPreHandle(javax.servlet.ServletRequest,javax.servlet.ServletResponse,java.lang.Object)"><code>onPreHandle</code></a>. If the
path does not match or the filter is not enabled for that path, this filter will allow passthrough immediately
to allow the <code>FilterChain</code> to continue executing.
<p/>
In order to retain path-matching functionality, subclasses should not override this method if at all
possible, and instead override
<a href="#onPreHandle(javax.servlet.ServletRequest,javax.servlet.ServletResponse,java.lang.Object)"><code>onPreHandle</code></a> instead.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../servlet/AdviceFilter.html#preHandle(javax.servlet.ServletRequest,javax.servlet.ServletResponse)">preHandle</a></code>&nbsp;in class&nbsp;<code><a href="../servlet/AdviceFilter.html" title="class in org.apache.shiro.web.servlet">AdviceFilter</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>request</code> - the incoming ServletRequest</dd>
<dd><code>response</code> - the outgoing ServletResponse</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the filter chain is allowed to continue to execute, <code>false</code> if a subclass has
handled the request explicitly.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang" class="externalLink">Exception</a></code> - if an error occurs</dd>
</dl>
</li>
</ul>
<a id="onPreHandle(javax.servlet.ServletRequest,javax.servlet.ServletResponse,java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onPreHandle</h4>
<pre class="methodSignature">protected&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/filter/PathMatchingFilter.html#line.249">onPreHandle</a>&#8203;(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a>&nbsp;request,
<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletResponse</a>&nbsp;response,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;mappedValue)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang" class="externalLink">Exception</a></pre>
<div class="block">This default implementation always returns <code>true</code> and should be overridden by subclasses for custom
logic if necessary.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>request</code> - the incoming ServletRequest</dd>
<dd><code>response</code> - the outgoing ServletResponse</dd>
<dd><code>mappedValue</code> - the filter-specific config value mapped to this filter in the URL rules mappings.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the request should be able to continue, <code>false</code> if the filter will
handle the response directly.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang" class="externalLink">Exception</a></code> - if an error occurs</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#isEnabled(javax.servlet.ServletRequest,javax.servlet.ServletResponse,java.lang.String,java.lang.Object)"><code>isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse, String, Object)</code></a></dd>
</dl>
</li>
</ul>
<a id="isEnabled(javax.servlet.ServletRequest,javax.servlet.ServletResponse,java.lang.String,java.lang.Object)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>isEnabled</h4>
<pre class="methodSignature">protected&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/filter/PathMatchingFilter.html#line.273">isEnabled</a>&#8203;(<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletRequest</a>&nbsp;request,
<a href="https://docs.oracle.com/javaee/5/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet" class="externalLink">ServletResponse</a>&nbsp;response,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;path,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a>&nbsp;mappedValue)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang" class="externalLink">Exception</a></pre>
<div class="block">Path-matching version of the parent class's
<a href="../servlet/OncePerRequestFilter.html#isEnabled(javax.servlet.ServletRequest,javax.servlet.ServletResponse)"><code>OncePerRequestFilter.isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse)</code></a> method, but additionally allows
for inspection of any path-specific configuration values corresponding to the specified request. Subclasses
may wish to inspect this additional mapped configuration to determine if the filter is enabled or not.
<p/>
This method's default implementation ignores the <code>path</code> and <code>mappedValue</code> arguments and merely
returns the value from a call to <a href="../servlet/OncePerRequestFilter.html#isEnabled(javax.servlet.ServletRequest,javax.servlet.ServletResponse)"><code>OncePerRequestFilter.isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse)</code></a>.
It is expected that subclasses override this method if they need to perform enable/disable logic for a specific
request based on any path-specific config for the filter instance.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>request</code> - the incoming servlet request</dd>
<dd><code>response</code> - the outbound servlet response</dd>
<dd><code>path</code> - the path matched for the incoming servlet request that has been configured with the given <code>mappedValue</code>.</dd>
<dd><code>mappedValue</code> - the filter-specific config value mapped to this filter in the URL rules mappings for the given <code>path</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if this filter should filter the specified request, <code>false</code> if it should let the
request/response pass through immediately to the next element in the <code>FilterChain</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang" class="externalLink">Exception</a></code> - in the case of any error</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.2</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/PathMatchingFilter.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2004&#x2013;2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>