3

I'd like to track & print some diagnostic information (when in debug run) for when a web request starts and when it ends. Is there some kind of event/listener/callback I can register to listen for web request lifecycle events?

To make it more concrete, one of the things (not the only one) I want to do is track how long it took to process the request.

Wouter Lievens
  • 4,019
  • 5
  • 41
  • 66

1 Answers1

1

If you are using Tomcat as your server, you can try its Request Dumper Filter:

http://tomcat.apache.org/tomcat-7.0-doc/config/filter.html#Request_Dumper_Filter

Otherwise, you could try a HandlerInterceptor in Spring Spring HandlerInterceptor vs Servlet Filters

Community
  • 1
  • 1
Neil McGuigan
  • 46,580
  • 12
  • 123
  • 152