How would a filter log request information without altering the request itself?

  • Use a separate logging library
  • Use a wrapper around the ServletResponse
  • Use response.getWriter().write()
  • Use response.log() method
To log request information without altering the response, a filter can use a wrapper around the ServletResponse. This allows capturing the response data without modifying it.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *