The Apache Tomcat Servlet/JSP Container

The Apache Tomcat 5.5 Servlet/JSP Container

Apache Logo

Links

Top Level Elements

Connectors

Containers

Nested Components

Global Settings

Apache Tomcat Configuration Reference

Container Provided Filters

Table of Contents
Introduction

Tomcat provides a number of Filters which may be configured for use with all web applications using $CATALINA_BASE/conf/web.xml or may be configured for individual web applications by configuring them in the application's WEB-INF/web.xml. Each filter is described below.

This description uses the variable name $CATALINA_BASE to refer the base directory against which most relative paths are resolved. If you have not configured Tomcat for multiple instances by setting a CATALINA_BASE directory, then $CATALINA_BASE will be set to the value of $CATALINA_HOME, the directory into which you have installed Tomcat.

Failed Request Filter
Introduction

This filter triggers parameters parsing in a request and rejects the request if some parameters were skipped during parameter parsing because of parsing errors or request size limitations (such as maxParameterCount attribute in a Connector). This filter can be used to ensure that none parameter values submitted by client are lost.

Note that parameter parsing may consume the body of an HTTP request, so caution is needed if the servlet protected by this filter uses request.getInputStream() or request.getReader() calls. In general the risk of breaking a web application by adding this filter is not so high, because parameter parsing does check content type of the request before consuming the request body.

The request is rejected with HTTP status code 400 (Bad Request).

Filter Class Name

The filter class name for the Failed Request Filter is org.apache.catalina.filters.FailedRequestFilter .

Initialisation parameters

The Failed Request Filter does not support any initialization parameters.


Copyright © 1999-2010, Apache Software Foundation