打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Tomcat8打印请求头配置

Request Dumper Filter

Introduction

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.

Filter Class Name

The filter class name for the Request Dumper Filter is org.apache.catalina.filters.RequestDumperFilter .

Initialisation parameters

The Request Dumper Filter does not support any initialization parameters.

Sample Configuration

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
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
为Tomcat写了一个增强的可以限制浏览器和防盗链过滤器提交到Tomcat的bug里被拒了:(
显示详细错误信息方法tomcat org.apache.catalina.core.StandardContext startInternal
tomcat做成服务的日志问题
Apache Tomcat 6.0 - Logging in Tomcat
tomcat日志配置之一自带log
tomcat中的几种log catalina localhost
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服