当前位置:Gxlcms >
数据库问题 >
01. localhost_access_log 记录post请求参数
01. localhost_access_log 记录post请求参数
时间:2021-07-01 10:21:17
帮助过:20人阅读
"
, output);
}
chain.doFilter(request, response);
}
@Override
public
void
init(FilterConfig filterConfig)
throws
ServletException {
this
.filterConfig = filterConfig;
}
}
web.xml中配置该Filter
12345678 | < filter > < filter-name >post-data-dumper-filter</ filter-name > < filter-class >com.sea.lhsaq2009.PostDataDumperFilter</ filter-class > </ filter > < filter-mapping > < filter-name >post-data-dumper-filter</ filter-name > < url-pattern >/*</ url-pattern > </ filter-mapping > |
修改tomcat配置文件server.xml
修改 Host标签 下的 value标签
123 | < Valve className = "org.apache.catalina.valves.AccessLogValve" directory = "logs" prefix = "localhost_access_log." suffix = ".txt" pattern = ‘%h %p %H %l %u %t "%r" params={%{postdata}r} %s %bbytes %Dms‘ resolveHosts = "false" /> |
打印结果