How to Filter Requests & Responses with Java EE 8

We use filters a lot, whether, for image compression, logging, or authentication, they have been with us since J2EE 1.3, that’s in 2001!
Now before digging into Java EE 8, let’s check how we used to write filters until today.