Top Description Fields Constructors Methods
org.apache.tomcat.util.descriptor.web

public Class FilterMap

extends XmlEncodingBase
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.io.Serializable, java.util.ArrayList, .List, .Locale, jakarta.servlet.DispatcherType, org.apache.tomcat.util.buf.UDecoder

Representation of a filter mapping for a web application, as represented in a <filter-mapping> element in the deployment descriptor. Each filter mapping must contain a filter name plus either a URL pattern or a servlet name.
Author
Craig R. McClanahan

Field Summary

Modifier and TypeField and Description
public static final int
private int
public static final int
ERROR

The name of this filter to be executed when this mapping matches a particular request.

private String
public static final int
public static final int
private boolean
matchAllServletNames

The flag that indicates this mapping will match all servlet-names

private boolean
matchAllUrlPatterns

The flag that indicates this mapping will match all url-patterns

private static final int
public static final int
private static final long
private String[]
servletNames

The servlet name this mapping matches.

private String[]
urlPatterns

The URL pattern this mapping matches.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addServletName(String servletName)

public void
addURLPattern(String urlPattern)

public void
public int
public String[]
public String
public boolean
public boolean
public String[]
public String[]
public void
setDispatcher(String
the dispatcher type which should match this filter
dispatcherString
)

This method will be used to set the current state of the FilterMap representing the state of when filters should be applied.

public void
setFilterName(String filterName)

public String
toString()

Overrides java.lang.Object.toString.

Render a String representation of this object.

Inherited from org.apache.tomcat.util.descriptor.web.XmlEncodingBase:
getCharsetsetCharset

Field Detail

ASYNCback to summary
public static final int ASYNC
dispatcherMappingback to summary
private int dispatcherMapping
ERRORback to summary
public static final int ERROR

The name of this filter to be executed when this mapping matches a particular request.

filterNameback to summary
private String filterName
FORWARDback to summary
public static final int FORWARD
INCLUDEback to summary
public static final int INCLUDE
matchAllServletNamesback to summary
private boolean matchAllServletNames

The flag that indicates this mapping will match all servlet-names

matchAllUrlPatternsback to summary
private boolean matchAllUrlPatterns

The flag that indicates this mapping will match all url-patterns

NOT_SETback to summary
private static final int NOT_SET
REQUESTback to summary
public static final int REQUEST
serialVersionUIDback to summary
private static final long serialVersionUID
servletNamesback to summary
private String[] servletNames

The servlet name this mapping matches.

urlPatternsback to summary
private String[] urlPatterns

The URL pattern this mapping matches.

Constructor Detail

FilterMapback to summary
public FilterMap()

Method Detail

addServletNameback to summary
public void addServletName(String servletName)
addURLPatternback to summary
public void addURLPattern(String urlPattern)
addURLPatternDecodedback to summary
public void addURLPatternDecoded(String urlPattern)
getDispatcherMappingback to summary
public int getDispatcherMapping()
getDispatcherNamesback to summary
public String[] getDispatcherNames()
getFilterNameback to summary
public String getFilterName()
getMatchAllServletNamesback to summary
public boolean getMatchAllServletNames()
getMatchAllUrlPatternsback to summary
public boolean getMatchAllUrlPatterns()
getServletNamesback to summary
public String[] getServletNames()
getURLPatternsback to summary
public String[] getURLPatterns()
setDispatcherback to summary
public void setDispatcher(String dispatcherString)

This method will be used to set the current state of the FilterMap representing the state of when filters should be applied.

Parameters
dispatcherString:String

the dispatcher type which should match this filter

setFilterNameback to summary
public void setFilterName(String filterName)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Render a String representation of this object.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

Annotations
@Override