What's the best way to dump out request or response headers in Tomcat?
Before rolling up your own solution, take a look at the valve component that Tomcat supports. In particular, the aptly named RequestDumperValve will log all the request and response headers in Tomcat. To enable the valve, just go to your server.xml file in the /conf directory and uncomment this line:
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
Then restart your server and the headers will appear in your log file.
10 comments:
very useful information.
thnks
your the man cool-guy
see you at the beach
This was greatly helpful! Thanks,
Very useful post, thanks!
useful :)
Thank you sir. Exactly what I needed.
Very useful, but didn't print request POST body for me in tomcat6
This would be MUCH more helpful if you told us where to put that value. But, thank you for the post
I am getting classnotfoundexception in Tomcat8.5
I am getting classnotfoundexception in Tomcat8.5
Post a Comment