I’ve created servlet filters for my java webserver. I wanted to keep record of the number of bytes written into the response output stream. There are two ways I’ve seen so far to accomplish this:
1.) Making your own custom
HttpServletResponseWrapper: How to read and copy the HTTP servlet response output stream content for logging
Is there any other solutions for this? Specifically, something that does not use Spring? Preferably something in Guava? It would be nice to see a solution where I don’t have to create a custom
HttpServletResponseWrapper (per the first solution).