MCPcopy Create free account
hub / github.com/apache/tomcat / addFilter

Method addFilter

java/org/apache/tomcat/util/descriptor/web/WebXml.java:521–527  ·  view source on GitHub ↗

Adds a filter definition. @param filter The filter definition @throws IllegalArgumentException If a filter with the same name already exists

(FilterDef filter)

Source from the content-addressed store, hash-verified

519 * @throws IllegalArgumentException If a filter with the same name already exists
520 */
521 public void addFilter(FilterDef filter) {
522 if (filters.containsKey(filter.getFilterName())) {
523 // Filter names must be unique within a web(-fragment).xml
524 throw new IllegalArgumentException(sm.getString("webXml.duplicateFilter", filter.getFilterName()));
525 }
526 filters.put(filter.getFilterName(), filter);
527 }
528
529 /**
530 * Returns the filter definitions.

Callers 2

Calls 4

getFilterNameMethod · 0.65
getStringMethod · 0.65
putMethod · 0.65
containsKeyMethod · 0.45

Tested by 2