According to the formula, the young (people under 65), the rich (people with incomes > $50,000/year), and the inexperienced (people with less than 10 years of service) receive no auxiliary stipend. Instead of sending requests from these people all the way to the calculator servlet, we can add filters to "short circuit" their requests. Each of these filters demonstrates a different technique for filtering requests.
We also demonstrate how to filter requests to Java Server Pages.
Filters process requests on their way to a servlet (or JSP), but they can also process the response sent back from a servlet (but not a JSP). This technique is also demonstrated.
Finally, we show how filters can intercept exceptions.