Top Description Fields Constructors Methods
org.apache.catalina.filters

public abstract Class FilterBase

extends Object
implements Filter
Class Inheritance
All Implemented Interfaces
jakarta.servlet.Filter
Known Direct Subclasses
org.apache.catalina.filters.HttpHeaderSecurityFilter, org.apache.catalina.filters.RemoteCIDRFilter, org.apache.catalina.filters.RequestFilter, org.apache.catalina.filters.SetCharacterEncodingFilter, org.apache.catalina.filters.AddDefaultCharsetFilter, org.apache.catalina.filters.CsrfPreventionFilterBase, org.apache.catalina.filters.ExpiresFilter, org.apache.catalina.filters.FailedRequestFilter
Imports
java.util.Enumeration, jakarta.servlet.Filter, .FilterConfig, .ServletException, org.apache.juli.logging.Log, org.apache.tomcat.util.IntrospectionUtils, org.apache.tomcat.util.res.StringManager

Base class for filters that provides generic initialisation and a simple no-op destruction.

Field Summary

Modifier and TypeField and Description
protected static final StringManager

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected abstract Log
public void
init(FilterConfig
The configuration information associated with the filter instance being initialised
filterConfig
)

Overrides default jakarta.servlet.Filter.init.

Iterates over the configuration parameters and either logs a warning, or throws an exception for any parameter that does not have a matching setter in this filter.

protected boolean

Returns:

true if a problem should trigger the failure of this filter, else false
isConfigProblemFatal
()

Determines if an exception when calling a setter or an unknown configuration attribute triggers the failure of the this filter which in turn will prevent the web application from starting.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

smback to summary
protected static final StringManager sm

Constructor Detail

FilterBaseback to summary
public FilterBase()

Method Detail

getLoggerback to summary
protected abstract Log getLogger()
initback to summary
public void init(FilterConfig filterConfig) throws ServletException

Overrides default jakarta.servlet.Filter.init.

Iterates over the configuration parameters and either logs a warning, or throws an exception for any parameter that does not have a matching setter in this filter.

Parameters
filterConfig:FilterConfig

The configuration information associated with the filter instance being initialised

Annotations
@Override
Exceptions
ServletException:
if isConfigProblemFatal() returns true and a configured parameter does not have a matching setter
isConfigProblemFatalback to summary
protected boolean isConfigProblemFatal()

Determines if an exception when calling a setter or an unknown configuration attribute triggers the failure of the this filter which in turn will prevent the web application from starting.

Returns:boolean

true if a problem should trigger the failure of this filter, else false