Originally posted by C Vivek:
Hi Bear,
Just another quick question. What are the scenarios I would need a filter or a set of filters? Is it just to get the user info or can I do something else.
When my Web page is opened in some x country. I would like to post adds specific to that local. Can this be achieved using filters?
Many Thanks,
Vivek
Filters are ideal for situations where you want to apply behavior across multiple pages.
A common example is a compression filter that gzips the response of your pages to improve performance for users with slow connections.
Another would a validation filter that removes any HTML markup from input fields before the request actually reaches the
servlet.
In both cases, this behavior can be applied without having to touch the original pages.