The Request Dumper Filter logs information from the request and response objects and is intended to be used for debugging purposes. When using this Filter, it is recommended that the org.apache.catalina.filter.RequestDumperFilter
logger is directed to a dedicated file and that the org.apache.juli.VerbatimFormmater
is used.
WARNING: Using this filter has side-effects. The output from this filter includes any parameters included with the request. The parameters will be decoded using the default platform encoding. Any subsequent calls to request.setCharacterEncoding()
within the web application will have no effect.
The filter class name for the Request Dumper Filter is org.apache.catalina.filters.RequestDumperFilter
.
The Request Dumper Filter does not support any initialization parameters.
The following entries in a web application's web.xml would enable the Request Dumper filter for all requests for that web application. If the entries were added to CATALINA_BASE/conf/web.xml
, the Request Dumper Filter would be enabled for all web applications.
<filter> <filter-name>requestdumper</filter-name> <filter-class> org.apache.catalina.filters.RequestDumperFilter </filter-class></filter><filter-mapping> <filter-name>requestdumper</filter-name> <url-pattern>*</url-pattern></filter-mapping>
The following entries in CATALINA_BASE/conf/logging.properties would create a separate log file for the Request Dumper Filter output.
# To this configuration below, 1request-dumper.org.apache.juli.FileHandler# also needs to be added to the handlers property near the top of the file1request-dumper.org.apache.juli.FileHandler.level = INFO1request-dumper.org.apache.juli.FileHandler.directory = ${catalina.base}/logs1request-dumper.org.apache.juli.FileHandler.prefix = request-dumper.1request-dumper.org.apache.juli.FileHandler.formatter = org.apache.juli.VerbatimFormatterorg.apache.catalina.filters.RequestDumperFilter.level = INFOorg.apache.catalina.filters.RequestDumperFilter.ha
联系客服